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

Missing field customContentType for uptime checks #14285

Comments

@costis
Copy link

costis commented Apr 12, 2023

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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

The google_monitoring_uptime_check_config resource doesn't support the field customContentType for http_check

New or Affected Resource(s)

  • google_monitoring_uptime_check_config

Potential Terraform Configuration

resource "google_monitoring_uptime_check_config" "check" {
  display_name = "example uptime check"
  timeout      = "60s"
  project      = var.project_id

  http_check {
    request_method    = "POST"
    content_type      = "USER_PROVIDED"
    customContentType = "application/json"
    path              = "/messages"
    port              = "443"
    use_ssl           = "true"
    validate_ssl      = "true"
    body              = jsonencode({ "message" = "hello" })

    accepted_response_status_codes {
      status_class = "STATUS_CLASS_2XX"
    }
  }

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

References

See Google documentation:

b/299683580

@rileykarson rileykarson added this to the Goals milestone Apr 17, 2023
@DrFaust92
Copy link
Contributor

looking into it

@birnazarova2
Copy link

Is there any update on this? I needed to create an uptime check with application/json content-type, but looks like it is still not supported.

@github-actions github-actions bot added forward/review In review; remove label to forward service/monitoring-uptime labels Aug 17, 2023
@jg-baracoda
Copy link

Same for me - it's not possible to create proper uptime check by terraform.
I ended up creating many uptime checks and manually changing content-type to application/json as my app doesn't support urlencoded.

@melinath melinath added forward/linked and removed forward/review In review; remove label to forward labels Sep 7, 2023
@jdurelli
Copy link

jdurelli commented Nov 1, 2023

I will create a PR for this and some similar issues

Copy link

github-actions bot commented Dec 2, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.