terraform-provider-stackitp.../docs/resources/security_group.md
Alexander Dahmen 721e10a02f
chore(examples): Add import examples for all resources (#939)
* chore(examples): Add import examples for all resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add guide: How to import resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
2025-08-08 14:03:27 +02:00

1.5 KiB

page_title subcategory description
stackit_security_group Resource - stackit Security group resource schema. Must have a region specified in the provider configuration.

stackit_security_group (Resource)

Security group resource schema. Must have a region specified in the provider configuration.

Example Usage

resource "stackit_security_group" "example" {
  project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  name       = "my_security_group"
  labels = {
    "key" = "value"
  }
}

# Only use the import statement, if you want to import an existing security group
import {
  to = stackit_security_group.import-example
  id = "${var.project_id},${var.security_group_id}"
}

Schema

Required

  • name (String) The name of the security group.
  • project_id (String) STACKIT project ID to which the security group is associated.

Optional

  • description (String) The description of the security group.
  • labels (Map of String) Labels are key-value string pairs which can be attached to a resource container
  • stateful (Boolean) Configures if a security group is stateful or stateless. There can only be one type of security groups per network interface/server.

Read-Only

  • id (String) Terraform's internal resource ID. It is structured as "project_id,security_group_id".
  • security_group_id (String) The security group ID.