Skip to content

Commit

Permalink
fixed null value error
Browse files Browse the repository at this point in the history
  • Loading branch information
imrannayer committed Nov 5, 2024
1 parent 80afd91 commit 0d5606d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/org_policy_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | <pre>list(object(<br> {<br> enforcement = bool<br> allow = optional(list(string))<br> deny = optional(list(string))<br> conditions = optional(list(object(<br> {<br> description = string<br> expression = string<br> title = string<br> location = string<br> }<br> )))<br> }<br> ))</pre> | n/a | yes |
| rules | List of rules per policy. Up to 10. | <pre>list(object(<br> {<br> enforcement = bool<br> allow = optional(list(string), [])<br> deny = optional(list(string), [])<br> conditions = optional(list(object(<br> {<br> description = string<br> expression = string<br> title = string<br> location = string<br> }<br> )), [])<br> }<br> ))</pre> | n/a | yes |

## Outputs

Expand Down
6 changes: 3 additions & 3 deletions modules/org_policy_v2/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ 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
expression = string
title = string
location = string
}
)))
)), [])
}
))
}

0 comments on commit 0d5606d

Please sign in to comment.