When does the dns_config of google_container_cluster go GA?

So we’re clear on this, the answer is a date :slight_smile:

I saw mentioned in some docs that dns_config was GA; in a terraform issue someone thought this was being promoted from beta. So, I added the google-beta provider to see if it was; at present I can only make this work with the google-beta provider.

This is pretty late-breaking stuff so it might be in the latest version of Terraform:

% tf version 
Terraform v1.2.9
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v4.3.0
+ provider registry.terraform.io/hashicorp/google-beta v4.3.0

Your version of Terraform is out of date! The latest version
is 1.3.0. You can update by downloading from            <- could upgrade
% cat provider.tf
# Check Releases here: version numbers tend to match, and should
# https://github.com/hashicorp/terraform-provider-google/releases
# https://github.com/hashicorp/terraform-provider-google-beta/releases
terraform {
  required_version = "~> 1.2.9"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 4.3.0"
    }
    google-beta = {
      source  = "hashicorp/google-beta"
      version = "~> 4.3.0"
    }
  }
}

provider "google" {
  region = var.region
  project = var.project_id
}

provider "google-beta" {
  region = var.region
  project = var.project_id
}

Then specified the provider in the GKE block:

% cat gke.tf
resource "google_container_cluster" "primary" {
  provider         = google-beta
  name             = var.cluster_apps
  location         = var.region
  enable_autopilot = true

  network    = google_compute_network.vpc.name
  subnetwork = google_compute_subnetwork.subnet.name

  dns_config {
    cluster_dns        = "CLOUD_DNS"
    cluster_dns_scope  = "VPC_SCOPE"
    cluster_dns_domain = var.dns_name
  }
}

After that, Terraform validated the config:

% tf validate
Success! The configuration is valid.

So, Terraform is happy and it built successfully on GCP! But, would still like to know which version of Terraform or a provider I need to upgrade to in order to use it in GA.