add module for security-group and security-group-rule

This commit is contained in:
Maximilian_Schlenz 2025-07-04 14:57:27 +02:00
parent 4e9fc826bf
commit 3a41f0d302
8 changed files with 103 additions and 0 deletions

5
security-group/main.tf Normal file
View file

@ -0,0 +1,5 @@
resource "stackit_security_group" "this" {
project_id = var.project_id
name = var.name
description = var.description == null ? var.name : var.description
}

7
security-group/output.tf Normal file
View file

@ -0,0 +1,7 @@
output "id" {
value = stackit_security_group.this.security_group_id
}
output "name" {
value = stackit_security_group.this.name
}

View file

@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.9.0"
required_providers {
stackit = {
source = "stackitcloud/stackit"
version = "0.56.0"
}
}
}

View file

@ -0,0 +1,12 @@
variable "project_id" {
type = string
}
variable "name" {
type = string
}
variable "description" {
type = string
default = null
}