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.33k stars 1.73k forks source link

resource google_gkeonprem_vmware_cluster argument dataplane_v2.windows_dataplane_v2_enabled not settings expected value #17913

Open bateau84 opened 6 months ago

bateau84 commented 6 months ago

Community Note

Terraform Version

Terraform v1.8.1 on linux_amd64

Affected Resource(s)

google_gkeonprem_vmware_cluster

Terraform Configuration

resource "google_gkeonprem_vmware_cluster" "gkee_onprem_cluster" {
  name                     = var.cluster_name
  ...
  dataplane_v2 {
    windows_dataplane_v2_enabled = false
  }
  ...
}

Debug Output

  ~ resource "google_gkeonprem_vmware_cluster" "gkee_onprem_cluster" {
        id                       = "projects/nrk-platt-gke-enterprise-test/locations/europe-west3/vmwareClusters/gkee-plattform-lab"
        name                     = "gkee-plattform-lab"
        # (22 unchanged attributes hidden)

      ~ dataplane_v2 {
          ~ windows_dataplane_v2_enabled = true -> false
            # (2 unchanged attributes hidden)
        }

        # (7 unchanged blocks hidden)
    }

Expected Behavior

Expecting windows_dataplane_v2_enabled to be false

Actual Behavior

even if i set this value to be false, it is "transformed" to true. Terraform sets this to false again, and by next run it repport it as true.

Steps to reproduce

  1. terraform plan -target google_gkeonprem_vmware_cluster.gkee_onprem_cluster
  2. terraform apply

Important Factoids

No response

References

No response

b/338112604

zli82016 commented 6 months ago

This is a bug in Terraform provider. The issue is that when windows_dataplane_v2_enabled is updated to false in the configuration, , windowsDataplaneV2Enabled: false is not included in the PATCH request to API.

Forwarding the issue to the service team to fix.

bateau84 commented 5 months ago

Is there a followup on this forwarded issue? or if there is a link to the issue being created on this issue`s behalf.

zli82016 commented 5 months ago

Is there a followup on this forwarded issue? or if there is a link to the issue being created on this issue`s behalf.

b/338112604 is the internal issue created for this issue.