Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot clear "description" field of google_compute_health_check #7440

Assignees
Labels

Comments

@pdecat
Copy link
Contributor

pdecat commented Oct 6, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

# terraform -v
Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/google v3.42.0

Affected Resource(s)

  • google_compute_health_check

Terraform Configuration Files

resource "google_compute_health_check" "tcp-health-check" {
  name = "tcp-health-check"

  timeout_sec        = 1
  check_interval_sec = 1

  tcp_health_check {
    port = "80"
  }
}

Debug Output

Full debug log: https://gist.github.com/pdecat/ac993f73cf163c34e3362f1ad827ac32

The PUT call does not submit an empty description:

2020-10-06T15:29:04.803+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:04 [DEBUG] Updating HealthCheck "projects/myproject/global/healthChecks/tcp-
health-check": map[string]interface {}{"checkIntervalSec":1, "healthyThreshold":2, "name":"tcp-health-check", "tcpHealthCheck":map[string]interface {}{"port":80, "proxyHeader":"NONE"},
"timeoutSec":1, "type":"TCP", "unhealthyThreshold":2}
2020-10-06T15:29:04.803+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:04 [DEBUG] Waiting for state to become: [success]
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:04 [DEBUG] Retry Transport: starting RoundTrip retry loop
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:04 [DEBUG] Retry Transport: request attempt 0
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:04 [DEBUG] Google API Request Details:
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: ---[ REQUEST ]---------------------------------------
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: PUT /compute/v1/projects/myproject/global/healthChecks/tcp-health-check?alt=json HTTP/1.1
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: Host: compute.googleapis.com
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: User-Agent: Terraform/0.13.4 (+https://www.terraform.io) Terraform-Plugin-SDK/2.0.3 terraform-provider-
google/3.42.0
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: Content-Length: 171
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: Content-Type: application/json
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: Accept-Encoding: gzip
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: {
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "checkIntervalSec": 1,
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "healthyThreshold": 2,
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "name": "tcp-health-check",
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "tcpHealthCheck": {
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:   "port": 80,
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:   "proxyHeader": "NONE"
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  },
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "timeoutSec": 1,
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "type": "TCP",
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:  "unhealthyThreshold": 2
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: }
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5:
2020-10-06T15:29:04.804+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: -----------------------------------------------------
2020-10-06T15:29:05.884+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: 2020/10/06 15:29:05 [DEBUG] Google API Response Details:
2020-10-06T15:29:05.884+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: ---[ RESPONSE ]--------------------------------------
2020-10-06T15:29:05.884+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: HTTP/1.1 200 OK
2020-10-06T15:29:05.884+0200 [DEBUG] plugin.terraform-provider-google_v3.42.0_x5: Connection: close

Panic Output

N/A

Expected Behavior

The description field that is not set in terraform configuration should be cleared.

Actual Behavior

The description field is not cleared, which generates a permanent diff on each plan.

Steps to Reproduce

  1. terraform apply -auto-approve
  2. gcloud compute health-checks update tcp tcp-health-check --description="OUT OF BAND CHANGE"
  3. terraform apply -auto-approve
  4. terraform plan

Important Factoids

The REST API does not explicitly states how to unset the description field: https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks

But the gcloud CLI does:

--description=DESCRIPTION
A textual description for the TCP health check. Pass in an empty string to unset.

See https://cloud.google.com/sdk/gcloud/reference/compute/health-checks/update/tcp

References

N/A

@ghost ghost added bug labels Oct 6, 2020
@pdecat pdecat changed the title Cannot clear description field of google_compute_health_check Cannot clear "description" field of google_compute_health_check Oct 6, 2020
@edwardmedia edwardmedia self-assigned this Oct 6, 2020
@edwardmedia
Copy link
Contributor

I see the problem Here is another log

@danawillow
Copy link
Contributor

@pdecat we cut our releases on Wednesday and then they go out on Monday, so this will be in 3.44.0: https://github.com/hashicorp/terraform-provider-google/pull/7527/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR27

@pdecat
Copy link
Contributor Author

pdecat commented Oct 15, 2020

Oh 🤦

I've been away of the internals of this provider's development for some time.
Has this delayed release workflow been in place for long?

@danawillow
Copy link
Contributor

Yeah, I think we started around the beginning of 2020? It helps us make sure we get a release out at about the same time every week, and if there are issues with our integration tests we have a few days to resolve them.

@pdecat
Copy link
Contributor Author

pdecat commented Oct 22, 2020

Fix confirmed with v3.44.0, thanks!

@ghost
Copy link

ghost commented Nov 12, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.