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

Remove deprecated internalCheckers from google_monitoring_uptime_check_config #3899

Closed
jahantech opened this issue Jun 21, 2019 · 6 comments
Closed
Assignees

Comments

@jahantech
Copy link

jahantech commented Jun 21, 2019

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.

Spent couple of hours trying to get my head around this one, the is_internal shouldn't be in the docs or the code and API doesn't support internalCheckers anymore.

Terraform Version

Terraform v0.11.14

Affected Resource(s)

google_monitoring_uptime_check_config

Terraform config

resource "google_monitoring_uptime_check_config" "example_check" {
  display_name = "${var.cluster_name}-http-check"
  timeout = "60s"

  http_check{
    use_ssl = true
  }
  is_internal = true

  internal_checkers {
    network = "${data.google_compute_network.current.self_link}"
  }

  monitored_resource {
    type = "uptime_url"
    labels = {
      project_id = "${var.project}"
      host = "${var.cluster_name}"
    }
  }
}

Output

 Invalid JSON payload received. Unknown name "is_internal" at 'uptime_check_config': Cannot find field.

Expected Behavior

Should have created the check.

Actual Behavior

Doesn't create the check with is_internal = true and internalCheckers is now deprecated according to API Docs.

References

Documentation where it says its deprecated:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.uptimeCheckConfigs

Screenshot 2019-06-21 at 17 34 20

@ghost ghost added the bug label Jun 21, 2019
@jahantech jahantech changed the title Remove Deprecated internalCheckers from google_monitoring_uptime_check_config Remove deprecated internalCheckers from google_monitoring_uptime_check_config Jun 21, 2019
@rileykarson
Copy link
Collaborator

Hmm, a deprecated field should continue to work. Have you used this field in the past? & would it be possible to attach debug logs here?

@rileykarson rileykarson self-assigned this Jun 24, 2019
@jahantech
Copy link
Author

jahantech commented Jun 24, 2019

Thank you for your response. The problem is that, internalCheckers, require a field to be present that is "is_internal". But if you try to pass that in, the terraform returns:

Invalid JSON payload received. Unknown name "is_internal" at 'uptime_check_config': Cannot find field.

Reference:
https://www.terraform.io/docs/providers/google/r/monitoring_uptime_check_config.html#is_internal

Also in the API definition I don't see the isInternal/is_internal flag.

https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.uptimeCheckConfigs/create

Screenshot from API documentation:
Screenshot 2019-06-24 at 17 59 34

Also to answer your question, no this is the first time I was trying to use the field. I can try to get the debug logs for you if the above doesn't help.

@rileykarson
Copy link
Collaborator

The field appeared in a past revision of the documentation, around when we wrote the Terraform support for the resource. We'd used our code generator, and unfortunately it doesn't appear the field was tested. Based on the hard removal of the field, I suspect it didn't actually work, and was previously inadvertently surfaced in the REST docs.

I'll follow through with the product team to see what's happening here, and remove this from our docs if appropriate.

@rileykarson
Copy link
Collaborator

Confirmed upstream, this field was erroneously surfaced to the cloud.google.com docs and then from there to Terraform. Leaving this open to track removal from the provider config + docs.

@rileykarson
Copy link
Collaborator

Closed with GoogleCloudPlatform/magic-modules#1974

@ghost
Copy link

ghost commented Jul 27, 2019

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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants