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

bug: checks always triggering a change #246

Open
patrick-stephens opened this issue May 23, 2023 · 0 comments
Open

bug: checks always triggering a change #246

patrick-stephens opened this issue May 23, 2023 · 0 comments
Labels
type: bug Something isn't working

Comments

@patrick-stephens
Copy link

Terraform version

1.4.6

Provider version

1.6.5

Steps to reproduce

With no changes to checks I consistently get a delta reported, e.g.

resource "checkly_check_group" "cloud_api" {
  name         = "Cloud API"
  activated    = true
  muted        = false
  concurrency  = 3
  double_check = true
  locations = [
    "us-west-1",
    "eu-west-2",
    "ap-southeast-2",
  ]
  use_global_alert_settings = false
}


resource "checkly_check" "prod_cloud_api" {
  activated              = true
  degraded_response_time = 5000
  double_check           = true
  frequency              = 5
  group_id               = checkly_check_group.cloud_api.id
  group_order            = 0
  max_response_time      = 20000
  muted                  = false
  name                   = "cloud-api.calyptia.com"
  should_fail            = false
  tags = [
    "production",
    "terraform",
  ]
  type                      = "API"
  use_global_alert_settings = false

  alert_settings {
    escalation_type = "RUN_BASED"

    reminders {
      amount   = 1
      interval = 30
    }

    run_based_escalation {
      failed_run_threshold = 2
    }
  }

  alert_channel_subscription {
    channel_id = checkly_alert_channel.email_devops.id
    activated  = true
  }

  alert_channel_subscription {
    channel_id = checkly_alert_channel.pagerduty_alerts.id
    activated  = true
  }

  alert_channel_subscription {
    channel_id = checkly_alert_channel.slack_alerts.id
    activated  = true
  }

  request {
    body_type        = "NONE"
    follow_redirects = true
    method           = "GET"
    skip_ssl         = false
    url              = "https://cloud-api.calyptia.com"

    assertion {
      comparison = "EQUALS"
      source     = "STATUS_CODE"
      target     = "200"
    }
    assertion {
      comparison = "EQUALS"
      property   = "influx.ok"
      source     = "JSON_BODY"
      target     = "true"
    }
    assertion {
      comparison = "EQUALS"
      property   = "postgres.ok"
      source     = "JSON_BODY"
      target     = "true"
    }
  }
}

This reports on apply:

  - request {
      - body_type        = "NONE" -> null
      - follow_redirects = true -> null
      - headers          = {} -> null
      - method           = "GET" -> null
      - query_parameters = {} -> null
      - skip_ssl         = false -> null
      - url              = "https://cloud-api.calyptia.com" -> null

      - assertion {
          - comparison = "EQUALS" -> null
          - source     = "STATUS_CODE" -> null
          - target     = "200" -> null
        }
      - assertion {
          - comparison = "EQUALS" -> null
          - property   = "influx.ok" -> null
          - source     = "JSON_BODY" -> null
          - target     = "true" -> null
        }
      - assertion {
          - comparison = "EQUALS" -> null
          - property   = "postgres.ok" -> null
          - source     = "JSON_BODY" -> null
          - target     = "true" -> null
        }

      - basic_auth {}
    }
  + request {
      + body_type        = "NONE"
      + follow_redirects = true
      + headers          = (known after apply)
      + method           = "GET"
      + query_parameters = (known after apply)
      + skip_ssl         = false
      + url              = "https://cloud-api.calyptia.com"

      + assertion {
          + comparison = "EQUALS"
          + source     = "STATUS_CODE"
          + target     = "200"
        }
      + assertion {
          + comparison = "EQUALS"
          + property   = "influx.ok"
          + source     = "JSON_BODY"
          + target     = "true"
        }
      + assertion {
          + comparison = "EQUALS"
          + property   = "postgres.ok"
          + source     = "JSON_BODY"
          + target     = "true"
        }
    }

    # (4 unchanged blocks hidden)
}

What is expected?

No change unless a change is made.

What is actually happening?

Deltas reported on every plan/apply run.

System Info

No response

Any additional comments?

I did import these checks initially but this is after a few iterations since.

@patrick-stephens patrick-stephens added the type: bug Something isn't working label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant