hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.32k stars 1.72k forks source link

support master_global_access_config for psc clusters #15138

Closed yiyinglovecoding closed 1 year ago

yiyinglovecoding commented 1 year ago

Community Note

Description

Cluster master_global_access_config is missed when enable_private_endpoint and enable_private_nodes are set to false. For VPC peering clusters, enable_private_endpoint or enable_private_nodes will be set to true so master_global_access_config is well maintained. For psc cluster, however, enable_private_endpoint and enable_private_nodes may not set to true but still with non-empty master_global_access_config and we should respect this.

New or Affected Resource(s)

Potential Terraform Configuration

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.
resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  location = "us-central1"
  node_pool {
    name       = "default-pool" 
    node_count = 0 // node-pool with 0 nodes
  }
  private_cluster_config { 
    enable_private_endpoint = false
    master_global_access_config {
      enabled = true
    }
  }
}

References

b/291999495

yiyinglovecoding commented 1 year ago

I'll work on it.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.