fixes validation
This commit is contained in:
committed by
Wiktor Niesiobędzki
parent
1d8e48f9e4
commit
1dd4873a02
@@ -133,17 +133,9 @@ variable "iap_config" {
|
||||
})
|
||||
default = null
|
||||
|
||||
validation {
|
||||
condition = var.iap_config == null || (
|
||||
(try(var.iap_config.iam, null) != null && try(var.iap_config.iam_additive, null) == null) ||
|
||||
(try(var.iap_config.iam, null) == null && try(var.iap_config.iam_additive, null) != null)
|
||||
)
|
||||
error_message = "When iap_config is provided, exactly one of 'iam' or 'iam_additive' must be specified."
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = !(length(try(var.iap_config.iam, [])) > 0 && length(try(var.iap_config.iam_additive, [])) > 0)
|
||||
)
|
||||
|
||||
error_message = "When 'iam' or 'iam_additive' lists are provided in iap_config, they must not be empty."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user