Skip to content

Commit

Permalink
fix validation logic for operation_type (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
duzitong authored Sep 26, 2024
1 parent b8b27c7 commit 1e54abb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ variable "operation_type" {
description = "The intended operation for a cluster."

validation {
condition = var.operation_type == null || contains(["ClusterProvisioning", "ClusterUpgrade"], var.operation_type)
condition = contains(["ClusterProvisioning", "ClusterUpgrade"], var.operation_type == null ? "ClusterProvisioning" : var.operation_type)
error_message = "operation_type must be either 'ClusterProvisioning' or 'ClusterUpgrade'."
}
}
Expand Down

0 comments on commit 1e54abb

Please sign in to comment.