Compare commits
1 commit
main
...
module/sec
| Author | SHA1 | Date | |
|---|---|---|---|
| 93f2af55c7 |
2 changed files with 4 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ resource "stackit_security_group_rule" "rule" {
|
||||||
|
|
||||||
direction = var.rules[count.index].direction
|
direction = var.rules[count.index].direction
|
||||||
project_id = var.project_id
|
project_id = var.project_id
|
||||||
security_group_id = stackit_security_group.this.id
|
security_group_id = stackit_security_group.this.security_group_id
|
||||||
|
|
||||||
description = var.rules[count.index].description
|
description = var.rules[count.index].description
|
||||||
ether_type = var.rules[count.index].ether_type
|
ether_type = var.rules[count.index].ether_type
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ variable "description" {
|
||||||
variable "rules" {
|
variable "rules" {
|
||||||
description = "List of rules to attach to this security-group"
|
description = "List of rules to attach to this security-group"
|
||||||
type = list(object({
|
type = list(object({
|
||||||
direction = string
|
direction = string
|
||||||
description = optional(string)
|
description = optional(string)
|
||||||
ether_type = optional(string)
|
ether_type = optional(string)
|
||||||
icmp_parameters = optional(object({
|
icmp_parameters = optional(object({
|
||||||
|
|
@ -30,12 +30,12 @@ variable "rules" {
|
||||||
max = number
|
max = number
|
||||||
}))
|
}))
|
||||||
protocol = optional(object({
|
protocol = optional(object({
|
||||||
name = optional(string)
|
name = optional(string)
|
||||||
}))
|
}))
|
||||||
remote_security_group_id = optional(string)
|
remote_security_group_id = optional(string)
|
||||||
}))
|
}))
|
||||||
default = []
|
default = []
|
||||||
validation {
|
validation {
|
||||||
condition = alltrue([
|
condition = alltrue([
|
||||||
for rule in var.rules : contains(["ingress", "egress"], rule.direction)
|
for rule in var.rules : contains(["ingress", "egress"], rule.direction)
|
||||||
# ... need more validations
|
# ... need more validations
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue