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

Terraform reports "method" is not allowed to be empty on request url change #17

Open
tomasz-sadura opened this issue Jun 29, 2020 · 1 comment

Comments

@tomasz-sadura
Copy link

tomasz-sadura commented Jun 29, 2020

tf version
Terraform v0.12.12

  • provider.checkly v0.6.2

Apply the following:

provider "checkly" {
  api_key = ...
}

resource "checkly_check" "api-check" {
  name = "Name"
  type = "API"

  activated = true
  should_fail = false

  frequency = 1
  double_check = true

  use_global_alert_settings = false

  degraded_response_time = 10000
  max_response_time = 30000

  locations = [
    "us-west-1",
    "eu-west-1"
  ]

  alert_settings {
    escalation_type = "RUN_BASED"

    reminders {
      amount = 0
      interval = 15
    }

    run_based_escalation {
      failed_run_threshold = 3
    }

    ssl_certificates {
      enabled = false
    }
  }

  request {
    method = "GET"
    url = "https://service.url.com/first"

    follow_redirects = true
    headers = {}
    query_parameters = {}

    body_type = "NONE"

    assertion {
      source = "STATUS_CODE"
      comparison = "EQUALS"
      target = 200
    }

    basic_auth {
      username = ""
      password = ""
    }
  }
}

Than change request url, from https://service.url.com/first to https://service.url.com/second and apply. Terraform reports:

Error: API error: unexpected response status 400: "{\"statusCode\":400,\"error\":\"Bad Request\",\"message\":\"child \\\"request\\\" fails because [child \\\"method\\\" fails because [\\\"method\\\" is not allowed to be empty]]\",\"validation\":{\"source\":\"payload\",\"keys\":[\"request.method\"]}}"

@tnolet
Copy link
Contributor

tnolet commented Jun 29, 2020

@tomasz-sadura thanks for reporting, would you mind copy & pasting this issue to https://github.com/checkly/terraform-provider-checkly so we can track it and assign someone to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants