diff --git a/modules/org_policy_v2/README.md b/modules/org_policy_v2/README.md index 80e3118..bf071f2 100644 --- a/modules/org_policy_v2/README.md +++ b/modules/org_policy_v2/README.md @@ -118,7 +118,7 @@ To control module's behavior, change variables' values regarding the following: | policy\_root | Resource hierarchy node to apply the policy to: can be one of `organization`, `folder`, or `project`. | `string` | `"organization"` | no | | policy\_root\_id | The policy root id, either of organization\_id, folder\_id or project\_id | `string` | `null` | no | | policy\_type | The constraint type to work with (either 'boolean' or 'list') | `string` | `"list"` | no | -| rules | List of rules per policy. Up to 10. |
list(object(| n/a | yes | +| rules | List of rules per policy. Up to 10. |
{
enforcement = bool
allow = optional(list(string))
deny = optional(list(string))
conditions = optional(list(object(
{
description = string
expression = string
title = string
location = string
}
)))
}
))
list(object(| n/a | yes | ## Outputs diff --git a/modules/org_policy_v2/variables.tf b/modules/org_policy_v2/variables.tf index 7e1bf3d..73af8ca 100644 --- a/modules/org_policy_v2/variables.tf +++ b/modules/org_policy_v2/variables.tf @@ -64,8 +64,8 @@ variable "rules" { type = list(object( { enforcement = bool - allow = optional(list(string)) - deny = optional(list(string)) + allow = optional(list(string), []) + deny = optional(list(string), []) conditions = optional(list(object( { description = string @@ -73,7 +73,7 @@ variable "rules" { title = string location = string } - ))) + )), []) } )) }
{
enforcement = bool
allow = optional(list(string), [])
deny = optional(list(string), [])
conditions = optional(list(object(
{
description = string
expression = string
title = string
location = string
}
)), [])
}
))