23 lines
765 B
HCL
23 lines
765 B
HCL
resource "stackit_security_group" "this" {
|
|
project_id = var.project_id
|
|
name = var.name
|
|
description = var.description
|
|
}
|
|
|
|
resource "stackit_security_group_rule" "rule" {
|
|
for_each = {
|
|
for idx, r in var.rules : idx => r
|
|
}
|
|
|
|
direction = each.value.direction
|
|
project_id = var.project_id
|
|
security_group_id = stackit_security_group.this.security_group_id
|
|
|
|
description = each.value.description
|
|
ether_type = each.value.ether_type
|
|
icmp_parameters = each.value.icmp_parameters
|
|
ip_range = each.value.ip_range
|
|
port_range = each.value.port_range
|
|
protocol = each.value.protocol
|
|
remote_security_group_id = each.value.remote_security_group_id
|
|
}
|