diff --git a/modules/firewall-rules/README.md b/modules/firewall-rules/README.md index be06b8a5..fe8b7dde 100644 --- a/modules/firewall-rules/README.md +++ b/modules/firewall-rules/README.md @@ -41,7 +41,7 @@ module "firewall_rules" { |------|-------------|------|---------|:--------:| | network\_name | Name of the network this set of firewall rules applies to. | `string` | n/a | yes | | project\_id | Project id of the project that holds the network. | `string` | n/a | yes | -| rules | List of custom rule definitions (refer to variables file for syntax). |
list(object({
name = string
description = string
direction = string
priority = number
ranges = list(string)
source_tags = list(string)
source_service_accounts = list(string)
target_tags = list(string)
target_service_accounts = list(string)
allow = list(object({
protocol = string
ports = list(string)
}))
deny = list(object({
protocol = string
ports = list(string)
}))
log_config = object({
metadata = string
})
}))
| `[]` | no | +| rules | List of custom rule definitions (refer to variables file for syntax). |
list(object({
name = string
description = optional(string)
direction = optional(string)
priority = optional(number)
ranges = optional(list(string))
source_tags = optional(list(string))
source_service_accounts = optional(list(string))
target_tags = optional(list(string))
target_service_accounts = optional(list(string))
allow = optional(list(object({
protocol = string
ports = optional(list(string))
})))
deny = optional(list(object({
protocol = string
ports = optional(list(string))
})))
log_config = optional(object({
metadata = string
}))
}))
| `[]` | no | ## Outputs diff --git a/modules/firewall-rules/variables.tf b/modules/firewall-rules/variables.tf index 889b3522..c60d35cf 100644 --- a/modules/firewall-rules/variables.tf +++ b/modules/firewall-rules/variables.tf @@ -29,24 +29,24 @@ variable "rules" { default = [] type = list(object({ name = string - description = string - direction = string - priority = number - ranges = list(string) - source_tags = list(string) - source_service_accounts = list(string) - target_tags = list(string) - target_service_accounts = list(string) - allow = list(object({ + description = optional(string) + direction = optional(string) + priority = optional(number) + ranges = optional(list(string)) + source_tags = optional(list(string)) + source_service_accounts = optional(list(string)) + target_tags = optional(list(string)) + target_service_accounts = optional(list(string)) + allow = optional(list(object({ protocol = string - ports = list(string) - })) - deny = list(object({ + ports = optional(list(string)) + }))) + deny = optional(list(object({ protocol = string - ports = list(string) - })) - log_config = object({ + ports = optional(list(string)) + }))) + log_config = optional(object({ metadata = string - }) + })) })) } diff --git a/modules/firewall-rules/versions.tf b/modules/firewall-rules/versions.tf index 58f079c5..8dfbed1f 100644 --- a/modules/firewall-rules/versions.tf +++ b/modules/firewall-rules/versions.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = ">= 0.13.0" + required_version = ">= 1.3.0" required_providers { google = {