Skip to content

bug: Group settings unexpectedly overwrite check-level retry and alert configurations #332

@ehtung

Description

@ehtung

Terraform version

1.13.0

Provider version

1.15.0

Steps to reproduce

The group

resource "checkly_check_group" "my_group" {
  name        = "My Group"
  activated   = true
  concurrency = 5
  locations   = local.my_locations
}

Plan:

  # checkly_check_group.my_group will be created
+ resource "checkly_check_group" "my_group" {
      + activated    = true
      + concurrency  = 5
      + double_check = false
      + id           = (known after apply)
      + locations    = [
          + "ap-east-1",
          + ... others
          + "ap-southeast-3",
        ]
      + name         = "My Group"

      + alert_settings (known after apply)

      + api_check_defaults (known after apply)

      + retry_strategy {
          + type = "NO_RETRIES"
        }
    }

The checks

resource "checkly_check" "my_checks" {
  for_each = local.my_checks # There are 2 checks

  name      = each.value.name
  type      = each.value.type
  activated = each.value.activated
  frequency = each.value.frequency

  group_id  = checkly_check_group.my_group.id
  locations = local.my_locations

  retry_strategy {
    type        = "FIXED"
    max_retries = 2
    same_region = false
  }

  request {
    url              = each.value.request.url
    follow_redirects = true
    skip_ssl         = false

    # 2xx assertion blocks
  }
}

Plan (of 1 check, for simplicity):

  # checkly_check.my_checks["my-check-1"] will be created
+ resource "checkly_check" "my_checks" {
      + activated              = true
      + degraded_response_time = 15000
      + double_check           = false
      + frequency              = 1
      + group_id               = (known after apply)
      + id                     = (known after apply)
      + locations              = [
          + "ap-east-1",
          + ... others
          + "ap-southeast-3",
        ]
      + max_response_time      = 30000
      + name                   = "My Service 1"
      + type                   = "API"

      + alert_settings (known after apply)

      + request {
          + body_type        = "NONE"
          + follow_redirects = true
          + headers          = (known after apply)
          + ip_family        = "IPv4"
          + method           = "GET"
          + query_parameters = (known after apply)
          + skip_ssl         = false
          + url              = "https://my-service-1.com/healthz"
            # (1 unchanged attribute hidden)

          + assertion {
              + comparison = "GREATER_THAN"
              + source     = "STATUS_CODE"
              + target     = "199"
                # (1 unchanged attribute hidden)
            }
          + assertion {
              + comparison = "LESS_THAN"
              + source     = "STATUS_CODE"
              + target     = "300"
                # (1 unchanged attribute hidden)
            }

          + basic_auth (known after apply)
        }

      + retry_strategy {
          + base_backoff_seconds = 60
          + max_duration_seconds = 600
          + max_retries          = 2
          + same_region          = false
          + type                 = "FIXED"
        }
    }

What is expected?

  • Group created, with any values of its own retry and alert settings, except for overriding
  • Checks created, with their own retry and alert settings, not being overridden by group's

What is actually happening?

  • Group: Has “Group override for retries” and “Group override for alert settings” checked unexpectedly in GUI

    • Image
  • Checks: Retry strategies and alert settings grayed out due to being overridden by group

    • Image

Workaround (failed)

  • Manually edit group (GUI): Uncheck “Group override for retries” and “Group override for alert settings” 🔲
    • Terraform plan output:
      • to recreate the group,
      • checks no longer belong to the group, and 1 check with group_order changed (- group_order = 1 -> null)
  • Manually edit group (GUI): Check “Group override for retries” and “Group override for alert settings” ☑️
    • Terraform no longer plans to recreate the group. There were still other drifts, but they are "side-effects" and not very important in this bug report.

System Info

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions