terraform-google-kubernetes-engine icon indicating copy to clipboard operation
terraform-google-kubernetes-engine copied to clipboard

No Option for specifying image_type in auto_provisioning_defaults

Open endrec opened this issue 1 year ago • 0 comments

TL;DR

This issue resurrects #1191, which was closed for some reason without the corresponding PR merged.

The 'auto_provisioning_defaults' block supports image_type

But the option is not available currently in the module still.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#image_type

Detailed design

Here is how it could look like:


  cluster_autoscaling {
    enabled = var.cluster_autoscaling.enabled
    dynamic "auto_provisioning_defaults" {
      for_each = var.cluster_autoscaling.enabled ? [1] : []

      content {
        service_account  = local.service_account
        oauth_scopes     = local.node_pools_oauth_scopes["all"]
        min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
        image_type       = lookup(var.cluster_autoscaling, "image_type", "")
      }
    }
  }


### Additional information

_No response_

endrec avatar Mar 18 '24 17:03 endrec