Skip to content

Commit

Permalink
fix: auto_provisioning_defaults is not really optional
Browse files Browse the repository at this point in the history
Due to the disk_type validation for auto provision node pool,
this module always forced to create a GKE standard cluster
with a auto provisioned node pool. This is not desirable if
you manage pools separately like using the `gke-nodepool`.
  • Loading branch information
kumadee committed Feb 5, 2024
1 parent e219d92 commit a2e6503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gke-cluster-standard/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ variable "cluster_autoscaling" {
}
validation {
condition = (
var.cluster_autoscaling == null ? true : contains(
var.cluster_autoscaling == null || var.cluster_autoscaling.auto_provisioning_defaults == null ? true : contains(
["pd-standard", "pd-ssd", "pd-balanced"],
var.cluster_autoscaling.auto_provisioning_defaults.disk_type)
)
Expand Down

0 comments on commit a2e6503

Please sign in to comment.