add module for security-group and security-group-rule
This commit is contained in:
parent
4e9fc826bf
commit
3a41f0d302
8 changed files with 103 additions and 0 deletions
5
security-group/main.tf
Normal file
5
security-group/main.tf
Normal 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
7
security-group/output.tf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
output "id" {
|
||||
value = stackit_security_group.this.security_group_id
|
||||
}
|
||||
|
||||
output "name" {
|
||||
value = stackit_security_group.this.name
|
||||
}
|
||||
9
security-group/providers.tf
Normal file
9
security-group/providers.tf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
terraform {
|
||||
required_version = ">= 1.9.0"
|
||||
required_providers {
|
||||
stackit = {
|
||||
source = "stackitcloud/stackit"
|
||||
version = "0.56.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
12
security-group/variables.tf
Normal file
12
security-group/variables.tf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
variable "project_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "description" {
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
Reference in a new issue