Update fixtures variable type to follow the module experimental feature.
This commit is contained in:
parent
9d7ce78df2
commit
b8fae0fbf0
|
@ -15,6 +15,5 @@
|
||||||
terraform {
|
terraform {
|
||||||
required_version = ">= 1.1.0"
|
required_version = ">= 1.1.0"
|
||||||
|
|
||||||
# TODO: Remove once Terraform 1.3 is released https://github.com/hashicorp/terraform/releases/tag/v1.3.0-alpha20220622
|
|
||||||
experiments = [module_variable_optional_attrs]
|
experiments = [module_variable_optional_attrs]
|
||||||
}
|
}
|
|
@ -21,11 +21,26 @@ variable "config_directory" {
|
||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: convert to a proper data structure map(map(object({...}))) once tf1.3 is released and optional object keys are avaliable,
|
|
||||||
# for now it will cause multiple keys to be set to null for every policy definition
|
|
||||||
# https://github.com/hashicorp/terraform/releases/tag/v1.3.0-alpha20220622
|
|
||||||
variable "policies" {
|
variable "policies" {
|
||||||
description = "Organization policies keyed by parent in format `projects/project-id`, `folders/1234567890` or `organizations/1234567890`."
|
description = "Organization policies keyed by parent in format `projects/project-id`, `folders/1234567890` or `organizations/1234567890`."
|
||||||
type = any
|
type = map(map(object({
|
||||||
default = {}
|
inherit_from_parent = optional(bool) # List policy only.
|
||||||
|
reset = optional(bool)
|
||||||
|
rules = optional(
|
||||||
|
list(object({
|
||||||
|
allow = optional(list(string)) # List policy only. Stands for `allow_all` if set to empty list `[]` or to `values.allowed_values` if set to a list of values
|
||||||
|
deny = optional(list(string)) # List policy only. Stands for `deny_all` if set to empty list `[]` or to `values.denied_values` if set to a list of values
|
||||||
|
enforce = optional(bool) # Boolean policy only.
|
||||||
|
condition = optional(
|
||||||
|
object({
|
||||||
|
description = optional(string)
|
||||||
|
expression = optional(string)
|
||||||
|
location = optional(string)
|
||||||
|
title = optional(string)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
})))
|
||||||
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue