-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes pod_security_policy_config type issue #408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, one suggestion.
autogen/main/variables.tf.tmpl
Outdated
@@ -406,6 +406,7 @@ variable "enable_binary_authorization" { | |||
} | |||
|
|||
variable "pod_security_policy_config" { | |||
type = list(map(string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an object would be better actually.
type = list(map(string)) | |
type = list(object({ enabled = bool })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just updated the PR accordingly, wasn't sure about how strong the constraint should be :)
This fixes an issue where type defaults to string, and leads to a type error attempting to set the value from outside the module.
…orm-google-modules#408) * Specify type for pod_security_policy_config This fixes an issue where type defaults to string, and leads to a type error attempting to set the value from outside the module. * Generate modules following the changes to pod_security_policy_config
When attempting to use the variable pod_security_policy_config, as it has no specified type,
terraform interpret it has string, leading to errors such as
As it expects a list of map, i specified the type accordingly.
I used any for the value type inside the map for future-proof reason.
Feel free to comment!