Coder Social home page Coder Social logo

checkly / terraform-provider-checkly Goto Github PK

View Code? Open in Web Editor NEW
44.0 3.0 5.0 3.82 MB

Terraform provider for the Checkly monitoring service

Home Page: https://registry.terraform.io/namespaces/checkly

Makefile 0.65% Go 99.35%
terraform terraform-provider checkly iac

terraform-provider-checkly's Introduction

Checkly Terraform Provider

Contributor Covenant Tests GitHub go.mod Go version GitHub tag (latest by date)

This Terraform provider enables users to handle Checkly resources. Manage your checks, groups, alert channels and more and start declaring your monitoring setup as code.

Installation

Please take a look at the installation guide

If you're still using Terraform 0.12 please refer to terraform 0.12 documentation

Getting started

For documentation and example usage see:

  1. Checkly's documentation and getting started guide.
  2. The official provider resource documentation.
  3. Working demo.

Questions

For questions and support please open a new discussion. The issue list of this repo is exclusively for bug reports and feature/docs requests.

Issues

Please make sure to respect issue requirements and choose the proper issue template when opening an issue. Issues not conforming to the guidelines may be closed.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

License

MIT

terraform-provider-checkly's People

Contributors

antoine-c avatar bitfield avatar chocolateofpain avatar clample avatar cofiem avatar coolomina avatar dependabot[bot] avatar kjda avatar maxigimenez avatar miliberlin avatar ndom91 avatar pilimartinez avatar ragog avatar realorangeone avatar saaldjormike avatar shiini2 avatar tnolet avatar umutuzgur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

terraform-provider-checkly's Issues

basic_auth should not be a required field

Just trying out the latest release to use the new group functionality and have found my Checkly Terraform configuration is not immediately compatible. I came here to look at the examples to see if there were wider changes but unfortunately they are no longer valid (from the validation error I think the only issue is that basic_auth is now a required field).

It looks like there's on-going work in #7 to make this provider official, at which point we'll be able to see docs on the Terraform Registry: https://registry.terraform.io/browse/providers.

In the interim, is it possible to update the examples in the readme or perhaps even add some examples that get run and integration tested during the provider release process?

Specific issue is, given a main.tf of:

provider "checkly" {
  version = "~> 0.6"
  api_key = "xxx"
}

resource "checkly_check" "example-check" {
  name                      = "Example check"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true

  locations = [
    "us-west-1"
  ]

  request {
    url              = "https://api.example.com/"
    follow_redirects = true
    assertion {
      source     = "STATUS_CODE"
      comparison = "EQUALS"
      target     = "200"
    }
  }
}

Terraform validate returns:

Warning: Interpolation-only expressions are deprecated

  on main.tf line 4, in provider "checkly":
   4:   api_key = "${var.checkly_api_key}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.


Error: "request.0.basic_auth": required field is not set

  on main.tf line 7, in resource "checkly_check" "example-check":
   7: resource "checkly_check" "example-check" {

Versions are:

$ terraform version
Terraform v0.12.26
+ provider.checkly v0.6.0

Manually deleting check gives API error

Migrated from bitfield/terraform-provider-checkly#9

Steps to reproduce:

Create check via terraform
Delete check via UI
run terraform apply or terraform plan

Result:

checkly_check.example-check: Refreshing state... [id=36152cfc-f65c-42a9-b922-7eadd23c5840]

Error: API error: unexpected response status 404: "{"statusCode":404,"error":"Not Found"}"

Confirmed this still happens on v0.6.0

story: add support for locked environment variables in Checks & Groups

The current way of creating env variables in groups/checks does not allow to lock them:

environment_variables = {
    TEST = "Hello world"
}

We should migrate to a different structure that allow us to create env variables like this:

environment_variables = [{
    key = "TEST"
    value = "Hello world"
    locked = true
}]

unexpected response status on check group creation

Using the latest (0.6.0) version of terraform-provider-checkly and the following terraform file:

resource "checkly_check_group" "ragog0" {
name = "ragog0"
activated = true
muted = false
tags = [
"ragog0"
]
concurrency = 3
locations = [
"eu-central-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
]
}

I get the following error.

Error: API error: unexpected response status 400: "{\"statusCode\":400,\"error\":\"Bad Request\",\"message\":\"child \\\"apiCheckDefaults\\\" fails because [child \\\"Headers\\\" fails because [\\\"Headers\\\" must be an array]]\",\"validation\":{\"source\":\"payload\",\"keys\":[\"apiCheckDefaults.headers\"]}}" on owner-bcd-e2e.tf line 1, in resource "checkly_check_group" "owner-bcd-e2e": 1: resource "checkly_check_group" "owner-bcd-e2e" {

Am I missing a required parameter, or anything similar? Is there a way to update the docs to reflect it?

target required on a checkly_check assertion comparasion type is IS_NULL

Describe the bug
I expect if I write a check with an assertion and the comparison type is IS_NULL that a target would not be required. If I create a check via the web ui, and it shows me the delta between the terraform code and the api results, it shows no target. If I specify a target with a value of "", it works. If I view that delta, it shows no target. So it half understands the target isn't required, but the provider still forces me to set a empty value.

Version
1.0.0

To Reproduce

resource "checkly_check" "api_github" {
  name                      = "api_github"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true
  degraded_response_time    = 5000
  max_response_time         = 10000

  locations = var.locations

  request {
    url              = "https://github.com/"
    follow_redirects = true
    assertion {
      comparison = "IS_NULL"
      property   = "$.email"
      source     = "JSON_BODY"
    }
  }
}

Expected behavior
target not required

Error

terragrunt apply

Error: Missing required argument

  on api_check.tf line 18, in resource "checkly_check" "api_github":
  18:     assertion {

The argument "target" is required, but no definition was found.

ERRO[0001] Hit multiple errors:
Hit multiple errors:

Additional context

  ~ resource "checkly_check" "api_github" {
        id                        = "21829fe9-8b3c-4612-aa00-aea2e721b039"
        name                      = "api_github"
        tags                      = []
        # (16 unchanged attributes hidden)


      + request {
          + body_type        = "NONE"
          + follow_redirects = true
          + headers          = (known after apply)
          + method           = "GET"
          + query_parameters = (known after apply)
          + url              = "https://github.com/"

          + assertion {
              + comparison = "IS_NULL"
              + property   = "$.email"
              + source     = "JSON_BODY"
            }

          + basic_auth {
              + password = (known after apply)
              + username = (known after apply)
            }
        }
      - request {
          - body_type        = "NONE" -> null
          - follow_redirects = true -> null
          - headers          = {} -> null
          - method           = "GET" -> null
          - query_parameters = {} -> null
          - url              = "https://github.com/" -> null

          - assertion {
              - comparison = "IS_NULL" -> null
              - property   = "$.signed_in" -> null
              - source     = "JSON_BODY" -> null
            }
        }
        # (1 unchanged block hidden)
    }

working code

resource "checkly_check" "api_github" {
  name                      = "api_github"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true
  degraded_response_time    = 5000
  max_response_time         = 10000

  locations = var.locations

  request {      
    url              = "https://github.com/"
    follow_redirects = true
    assertion {
      comparison = "IS_NULL"
      property   = "$.email"
      source     = "JSON_BODY"
      target     = ""
    }
  }
}

bug: alert subscriber config diff for group is not detected

Describe the bug
If a group has alert subscriber config added externally, It's not detected on plan, the most horrible part is it removes all configs after applying the config.

Version
Provider : 1.2.0
TF : v1.0.9

To Reproduce
Create a group using terraform, and then modify the group alert setting using UI. Then re-apply the same config.

Expected behavior
Diff of alert config is detected.

Alert channel management

I would like to be able to manage alert channels through Terraform configuration. Right now when creating a check it is only possible to specify use_global_alert_settings property.

Fix the build status badge

Describe the bug
We have 2 different and this caused master to not run the tests upon a merge. Therefore, we end up with the a stale badge status. We should merge the 2 workflows and add a condition that the release job will only work if the branch was master

Support for Apple Silicon (darwin/arm64)

Describe the bug
With the release of Go 1.16 we can now build for the darwin/arm64 architecture. Checkly should support this to allow developers on new hardware use the plugin without having to use the Rosetta 2 emulation layer.

Add check-groups API

We want to be able to create, update and delete check groups using Terraform. This means two things:

  • Create & edit the definition of a check group resource.
  • Add / remove checks to/from the check group by populating the groupId on one or more checks.

Order is important as a check-group needs to be successfully created before a check can be added to it.

add `frequencyInterval` to Check resource

We want to expose the frequencyInterval on the Check resource.

The behaviour of this field is a bit finicky

  • it has very specific ranges determined by the frequency property.
  • it automatically changes to a random default value when setting a new frequency and not specifying any frequencyOffset

This means that the Terraform plan should allow for this value to differ from the stored local value.

We need to therefore test this as follows:

  • any existing TF plans should not churn when this value is introduced.
  • any plan that has this value specified should not churn when only the frequency changes by user input. E.g. the server will report an new value for frequencyOffset and the local TF state should accept that.

This requires this ticket to be shipped: checkly/checkly-go-sdk#26

tags can't be removed from a check using the provider

Describe the bug
When tags field is set on a check and then removed, the value is not changing in the backend but only in the local state.

Version
v0.6.5

To Reproduce
add the tag field and then remove it or make it empty

Expected behavior
Tags should correspond to the local state in the backend

Checkly plugin does not work with hashicorp/terraform docker container

Describe the bug
When using the hashicorp/terraform official terraform container, checkly plugin fails to run.

While I don't expect you to make a special plugin binary to cover this use case, you may want to add a note to the documentation. It's a common issue with golang programs running in alpine linux and can be hard to troubleshoot because the error message (no such file or directory) doesn't really point you in the right direction.

Version
What version of the Checkly Terraform provider are you using? e.g. v0.6.1
v0.6.6

To Reproduce
Steps to reproduce the behavior:

Use the checkly.tf resource file included below. Also uses install_checkly_plugin.sh included below which is a workaround to issue #35

$ docker run -v $(pwd):/run -it --rm --entrypoint=/bin/sh hashicorp/terraform

/ # apk add bash jq curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/5) Installing readline (8.0.4-r0)
(2/5) Installing bash (5.0.17-r0)
Executing bash-5.0.17-r0.post-install
(3/5) Installing curl (7.69.1-r1)
(4/5) Installing oniguruma (6.9.5-r1)
(5/5) Installing jq (1.6-r1)
Executing busybox-1.31.1-r16.trigger
OK: 31 MiB in 34 packages

/ # cd /run

/run # terraform init

Initializing the backend...

Initializing provider plugins...
- Finding local/checkly/checkly versions matching "0.6.6"...

Error: Failed to query available provider packages


Could not retrieve the list of available versions for provider
local/checkly/checkly: could not connect to local: Failed to request discovery
document: Get "https://local/.well-known/terraform.json": dial tcp: lookup
local on 192.168.65.1:53: read udp 172.17.0.2:44185->192.168.65.1:53: i/o
timeout

/run # ./install_checkly_plugin.sh
++ uname -s
+ [[ Linux == Darwin ]]
++ uname -s
+ [[ Linux == Linux ]]
+ platform=linux_amd64
+ jq_url_cmd='.assets[] | select(.name | endswith("linux_amd64.gz")).browser_download_url'
+ jq_ver_cmd='.name | sub("v(?<ver>.*)"; "\(.ver)")'
++ curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest
++ jq -r '.assets[] | select(.name | endswith("linux_amd64.gz")).browser_download_url'
+ url=https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_linux_amd64.gz
++ curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest
++ jq -r '.name | sub("v(?<ver>.*)"; "\(.ver)")'
+ ver=0.6.6
+ curl -OL https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_linux_amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   674  100   674    0     0   1345      0 --:--:-- --:--:-- --:--:--  1345
100 13.0M  100 13.0M    0     0  3692k      0  0:00:03  0:00:03 --:--:-- 5363k
++ basename https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_linux_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_linux_amd64.gz
+ gunzip terraform-provider-checkly_v0.6.6_linux_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_linux_amd64
+ chmod +x terraform-provider-checkly_v0.6.6_linux_amd64
+ PLUGIN_DIR=/root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64
+ mkdir -p /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64
+ mv terraform-provider-checkly_v0.6.6_linux_amd64 /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6

/run # terraform init

Initializing the backend...

Initializing provider plugins...
- Finding local/checkly/checkly versions matching "0.6.6"...
- Installing local/checkly/checkly v0.6.6...
- Installed local/checkly/checkly v0.6.6 (unauthenticated)

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
/run # terraform apply
var.checkly_api_key
  Enter a value: XXXXXXX


Error: Could not load plugin


Plugin reinitialization required. Please run "terraform init".

Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.

Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".

Failed to instantiate provider "local/checkly/checkly" to obtain schema:
fork/exec
.terraform/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6:
no such file or directory

Root cause
The root cause is that the checkly plugin was built with glibc, and the hashicorp/terraform container is based on alpine, which uses musl I think which isn't compatible with glibc dynamically linked binaries.

[pid   110] 20:39:56.588163 execve(".terraform/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6", [".terraform/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6"], ["HOSTNAME=a5663fe4b03c", "SHLVL=1", "HOME=/root", "OLDPWD=/", "TERM=xterm", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PWD=/run", "TF_PLUGIN_MAGIC_COOKIE=XXXX", "PLUGIN_MIN_PORT=10000", "PLUGIN_MAX_PORT=25000", "PLUGIN_PROTOCOL_VERSIONS=5", "PLUGIN_CLIENT_CERT=-----BEGIN CERTIFICATE-----\nMIICMDCC[...]lmnoy\n-----END CERTIFICATE-----\n"]) = -1 ENOENT (No such file or directory)

/run # ls -l .terraform/plugins/local/checkly/checkly/0.6.6/
total 0
lrwxrwxrwx    1 root     root            66 Sep 29 20:08 linux_amd64 -> /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64

/run # file /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6
/root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6:
 ELF 64-bit LSB executable, 
 x86-64, version 1 (SYSV),
 dynamically linked,
 interpreter /lib64/ld-linux-x86-64.so.2,
 Go BuildID=6PyyWzGCc1vlcg1_uJbd/ioHX04eG2EIZEiyYC7Ve/HR5DHbDVZW5T_FDk1Y-m/QnUCYvlhZbIl5yrQMHD5,
 not stripped

/run # ldd /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6
	/lib64/ld-linux-x86-64.so.2 (0x7f64fffbf000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f64fffbf000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f64fffbf000)

/run # ls -l /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory

/run # ls -l /lib64
ls: /lib64: No such file or directory

So the interpreter (/lib64/ld-linux-x86-64.so.2) specified in the header of the checkly plugin /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64 doesn't exist.

Workaround
Two options come to mind, although there are probably several others.

  1. Build your own terraform container based on golang:buster. You could base it on the Dockerfile at https://github.com/hashicorp/terraform/blob/master/Dockerfile

  2. Add the package libc6-compat to the hashicorp/terraform container before attempting to run terraform apply:

/run # apk add libc6-compat
(1/2) Upgrading musl (1.1.24-r8 -> 1.1.24-r9)
(2/2) Installing libc6-compat (1.1.24-r9)
OK: 38 MiB in 38 packages

/run # /root/.terraform.d/plugins/local/checkly/checkly/0.6.6/linux_amd64/terraform-provider-checkly_v0.6.6
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically

^ Now the checkly plugin binary will execute instead of saying no such file or directory.

terraform apply also works now:

/run # terraform apply
var.checkly_api_key
  Enter a value: XXXX
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # checkly_check.example-check will be created
  + resource "checkly_check" "example-check" {
      + activated                 = true
      + degraded_response_time    = 15000
[...]
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value:

Expected behavior
A clear and concise description of what you expected to happen.

Terraform applies successfully and I see the checkly checks in the web dashboard at https://app.checklyhq.com

TF Resource files
If applicable, add TF resource file examples to help explain your problem.

terraform {
  required_version = ">= 0.13"
  required_providers {
    checkly = {
      source = "local/checkly/checkly"
      version = "0.6.6"
    }
  }
}

variable "checkly_api_key" {}

provider "checkly" {
  api_key = "var.checkly_api_key"
}

resource "checkly_check" "example-check" {
  name                      = "Example check"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true

  locations = [
    "us-west-1"
  ]

  request {
    url              = "https://api.example.com/"
    follow_redirects = true
    assertion {
      source     = "STATUS_CODE"
      comparison = "EQUALS"
      target     = "200"
    }
  }
}

Install script (workaround to #35)

#!/usr/bin/env bash
set -x

# Determine architecture
if [[ $(uname -s) == Darwin ]]
then
	platform='darwin_amd64'
elif [[ $(uname -s) == Linux ]]
then
	platform='linux_amd64'
else
	echo "No supported architecture found"
	exit 1
fi

jq_url_cmd=".assets[] | select(.name | endswith(\"${platform}.gz\")).browser_download_url"
jq_ver_cmd=".name | sub(\"v(?<ver>.*)\"; \"\(.ver)\")"
# Find latest binary release URL for this platform
url="$(curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest | jq -r "${jq_url_cmd}")"
# Get the version of the latest binary release (e.g. 0.6.6)
ver="$(curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest | jq -r "${jq_ver_cmd}")"
# Download the tarball
curl -OL ${url}
# Rename and copy to your Terraform plugin folder
filename=$(basename $url)
gunzip ${filename}
filename=${filename%.gz}
chmod +x ${filename}
# /Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64/terraform-provider-checkly_v0.6.6
PLUGIN_DIR=~/.terraform.d/plugins/local/checkly/checkly/$ver/$platform
mkdir -p $PLUGIN_DIR
mv $filename ${PLUGIN_DIR}/${filename%_${platform}}

Additional context
#35 Checkly provider plugin does not work with terraform 0.13

TF always reports pending changes

Describe the bug

API checks keep report pending changes, even though no changes have been made to the definition.

Version

0.6.3 with terraform 0.11. Terraform state is on S3 bucket.

Terraform v0.11.14
.
└── provider.checkly >= 0.6.3

To Reproduce

create an API check:

resource "checkly_check" "google" {
  name                   = "google"
  type                   = "API"
  activated              = true
  should_fail            = false
  frequency              = 1
  degraded_response_time = 3000
  max_response_time      = 6000
  tags = [
    "testing",
    "bug"
  ]

  locations = [
    "eu-central-1"
  ]

  request {
    follow_redirects = false
    url              = "https://www.google.com"
    
    basic_auth {
        username = ""
        password = ""
    }

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

run terraform plan, apply. Then run terraform plan again and this is reported [slightly edited]:

Terraform will perform the following actions:                                                           
                                                                                                        
  ~ checkly_check.google                                                                                    
      request.1080913471.assertion.#:                                                       "1" => "0" 
      request.1080913471.assertion.3474411808.comparison:                                   "EQUALS" => ""  
      request.1080913471.assertion.3474411808.property:                                     "" => ""                                                     
      request.1080913471.assertion.3474411808.source:                                       "STATUS_CODE" => ""
      request.1080913471.assertion.3474411808.target:                                       "200" => ""   
      request.1080913471.body:                                                              "" => ""
      request.1080913471.body_type:                                                         "NONE" => ""       
      request.1080913471.follow_redirects:                                                  "false" => "false"
      request.1080913471.method:                                                            "GET" => ""
      request.1080913471.url:                                                               "https://www.google.com" => ""
      request.1800643113.assertion.#:                                                       "0" => "1"       
      request.1800643113.assertion.3474411808.comparison:                                   "" => "EQUALS"
      request.1800643113.assertion.3474411808.property:                                     "" => ""                                                     
      request.1800643113.assertion.3474411808.source:                                       "" => "STATUS_CODE"
      request.1800643113.assertion.3474411808.target:                                       "" => "200"
      request.1800643113.basic_auth.#:                                                      "0" => "1"       
      request.1800643113.basic_auth.3546472845.password:                                    "" => ""  
      request.1800643113.basic_auth.3546472845.username:                                    "" => ""  
      request.1800643113.body:                                                              "" => ""  
      request.1800643113.body_type:                                                         "" => "NONE"
      request.1800643113.follow_redirects:                                                  "" => "false"
      request.1800643113.headers.%:                                                         "" => <computed>
      request.1800643113.method:                                                            "" => "GET"
      request.1800643113.query_parameters.%:                                                "" => <computed> 
      request.1800643113.url:                                                               "" => "https://www.google.com"

Expected behavior

TF should not have reported changes after the configuration had been just applied.

TF Resource files

# cat main.tf 
variable "checkly_api_key" {}

provider "checkly" {
  version = ">= 0.6.3"
  api_key = "${var.checkly_api_key}"
}

Additional context

SSL checks are not added

Describe the bug
SSL cert checks are not uploaded correctly (at least they are not visible from the UI)
image

Version
v0.8.0

To Reproduce
Use this example check

resource "checkly_alert_channel" "email" {
  email {
    address = var.checkly_alert_email
  }
}

resource "checkly_check" "root_domain_check" {
  name                   = "root_domain_check"
  type                   = "API"
  activated              = true
  should_fail            = false
  frequency              = 30
  double_check           = true
  ssl_check              = true
  degraded_response_time = 300
  max_response_time      = 500

  locations = [
    "eu-central-1",
    "us-east-1"
  ]

  alert_settings {
    escalation_type = "RUN_BASED"

    run_based_escalation {
      failed_run_threshold = 2
    }

    ssl_certificates {
      enabled         = true
      alert_threshold = 30
    }

    reminders {
      amount   = 5
      interval = 30
    }
  }

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

  request {
    url              = "https://${local.website_domain}/"
    follow_redirects = false
    assertion {
      source     = "STATUS_CODE"
      comparison = "EQUALS"
      target     = "200"
    }
  }
}

Expected behavior
Should be able to set SSL cert checks via terraform

Additional context
Thanks for the awesome work, this is just a very minor thing I saw but I thought it was worth mentioning :)

Creating a browser check creates churn because of the `request` sub resource

Describe the bug
When you create a browser check using the following resource

resource "checkly_check" "example-check2" {
  name                      = "Example check"
  type                      = "BROWSER"
  activated                 = true
  should_fail               = false
  frequency                 = 10
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true

  script = "console.log('test')"

  locations = [
    "us-west-1"
  ]
}
  1. the first apply works.
  2. a second apply will create an update in place action because a default empty request resource is returned from the API. The request resource in not used in any Browser check,
Terraform will perform the following actions:

  # checkly_check.example-check2 will be updated in-place
  ~ resource "checkly_check" "example-check2" {
        activated                 = true
        degraded_response_time    = 15000
        double_check              = true
        environment_variables     = {}
        frequency                 = 10
        group_id                  = 0
        group_order               = 0
        id                        = "95cd2bf0-cb04-4b11-ac61-e27b38eee8f7"
        locations                 = [
            "us-west-1",
        ]
        max_response_time         = 30000
        muted                     = false
        name                      = "Example check"
        script                    = "console.log('test')"
        setup_snippet_id          = 0
        should_fail               = false
        ssl_check                 = true
        tags                      = []
        teardown_snippet_id       = 0
        type                      = "BROWSER"
        use_global_alert_settings = true

        alert_settings {
            escalation_type = "RUN_BASED"

            reminders {
                amount   = 0
                interval = 5
            }

            run_based_escalation {
                failed_run_threshold = 1
            }

            ssl_certificates {
                alert_threshold = 3
                enabled         = false
            }

            time_based_escalation {
                minutes_failing_threshold = 5
            }
        }

      - request {
          - follow_redirects = false -> null
          - headers          = {} -> null
          - query_parameters = {} -> null

          - basic_auth {}
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Version
v0.6.1

To Reproduce
See the example resource above.

Expected behavior
It does not create an "update in place"

TF Resource files
See above

Additional context
Workaround is to just use terraform apply -auto-approve

Group deletion should delete the checks as well and finish successfully

Describe the bug
When you delete a group resource right now, you get this error
Error: API error: unexpected response status 409: "{"statusCode":409,"error":"Conflict","message":"Please remove all checks from a group before deleting it."}"

Version
v0.6.6

To Reproduce
Delete a group resource that has associated checks to it

Expected behavior
The checks are deleted first and then the group

locations in checkly_check is required. But on UI, checks part of a group doesn't allow to change location.

Describe the bug
locations is required in checkly_check.
But checks part of a group does not require it, UI doesn't allow it to change.
Also, due to (I guess), change of locations is always detected.

This behavior is conflicting for Web UI.

Version
Terraform version: v1.0.9
Provider version : 1.2.0

To Reproduce
Create check part of group, have group with different locations config than checks.

Expected behavior
When a check is part of the group, locations shouldn't be accepted.

modifying check group fails: "id must be a valid GUID"

This issue is affecting end-users of the Terraform Provider.

Using the latest (0.6.1) version of terraform-provider-checkly and the following terraform file:

resource "checkly_check_group" "ragog0" {
name = "ragog0"
activated = true
muted = false
tags = [
"ragog0"
]
concurrency = 3
locations = [
"eu-central-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
]
}

the first run creates the check group as expected. A second run throws the following error:

checkly_check_group.test-group1: Modifying... [id=13141]

Error: API error: unexpected response status 400: "{\"statusCode\":400,\"error\":\"Bad Request\",\"message\":\"child \\\"id\\\" fails because [\\\"id\\\" must be a valid GUID]\",\"validation\":{\"source\":\"params\",\"keys\":[\"id\"]}}"

Could this be related to #15?

Checkly provider plugin does not work with terraform 0.13

Describe the bug
With terraform 0.13, the instructions provided for installing the plugin do not work. I've tried it in a docker container (based on golang:buster) and macOS.

Version
What version of the Checkly Terraform provider are you using? e.g. v0.6.1

v0.6.6

To Reproduce

$ terraform version
Terraform v0.13.3

$ curl https://raw.githubusercontent.com/checkly/terraform-provider-checkly/master/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   784  100   784    0     0   1433      0 --:--:-- --:--:-- --:--:--  1430
++ uname -s
+ [[ Darwin == Darwin ]]
+ platform=darwin_amd64
+ jq_cmd='.assets[] | select(.name | endswith("darwin_amd64.gz")).browser_download_url'
++ curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest
++ jq -r '.assets[] | select(.name | endswith("darwin_amd64.gz")).browser_download_url'
+ url=https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ curl -OL https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   675  100   675    0     0   1024      0 --:--:-- --:--:-- --:--:--  1022
100 12.8M  100 12.8M    0     0  3042k      0  0:00:04  0:00:04 --:--:-- 4330k
++ basename https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ gunzip terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_darwin_amd64
+ chmod +x terraform-provider-checkly_v0.6.6_darwin_amd64
+ PLUGIN_DIR=/Users/rchapman/.terraform.d/plugins/darwin_amd64
+ mkdir -p /Users/rchapman/.terraform.d/plugins/darwin_amd64
+ mv terraform-provider-checkly_v0.6.6_darwin_amd64 /Users/rchapman/.terraform.d/plugins/darwin_amd64/terraform-provider-checkly_v0.6.6

$ TF_LOG=trace terraform init -upgrade=false -get=false
2020/09/29 13:51:11 [INFO] Terraform version: 0.13.3
2020/09/29 13:51:11 [INFO] Go runtime version: go1.14.9
2020/09/29 13:51:11 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init", "-upgrade=false", "-get=false"}
2020/09/29 13:51:11 [DEBUG] Attempting to open CLI config file: /Users/rchapman/.terraformrc
2020/09/29 13:51:11 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/29 13:51:11 [DEBUG] checking for credentials in "/Users/rchapman/.terraform.d/plugins"
2020/09/29 13:51:11 [DEBUG] checking for credentials in "/Users/rchapman/.terraform.d/plugins/darwin_amd64"
2020/09/29 13:51:11 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/09/29 13:51:11 [DEBUG] will search for provider plugins in /Users/rchapman/.terraform.d/plugins
2020/09/29 13:51:11 [TRACE] getproviders.SearchLocalDirectory: /Users/rchapman/.terraform.d/plugins is a symlink to /Users/rchapman/.terraform.d/plugins
2020/09/29 13:51:11 [DEBUG] ignoring non-existing provider search directory /Users/rchapman/Library/Application Support/io.terraform/plugins
2020/09/29 13:51:11 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/09/29 13:51:11 [INFO] CLI command args: []string{"init", "-upgrade=false", "-get=false"}

Initializing the backend...
2020/09/29 13:51:11 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/09/29 13:51:11 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/09/29 13:51:11 [DEBUG] New state was assigned lineage "134ed6cf-6d5a-e6ff-7275-d613a481268d"
2020/09/29 13:51:11 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/09/29 13:51:11 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/09/29 13:51:11 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
2020/09/29 13:51:11 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins
2020/09/29 13:51:11 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/plugins: failed to read metadata about .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: stat .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: no such file or directory
2020/09/29 13:51:11 [WARN] Failed to determine selected providers: failed to recall provider packages selected by earlier 'terraform init': some providers could not be installed:
- local/checkly/checkly: package for selected version 0.6.6 is no longer available in the local cache directory
2020/09/29 13:51:11 [DEBUG] checking for provisioner in "."
2020/09/29 13:51:11 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/09/29 13:51:11 [DEBUG] checking for provisioner in "/Users/rchapman/.terraform.d/plugins"
2020/09/29 13:51:11 [DEBUG] checking for provisioner in "/Users/rchapman/.terraform.d/plugins/darwin_amd64"
2020/09/29 13:51:11 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2020/09/29 13:51:11 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/09/29 13:51:11 [TRACE] backend/local: state manager for workspace "default" will:
 - read initial snapshot from terraform.tfstate
 - write new snapshots to terraform.tfstate
 - create any backup at terraform.tfstate.backup
2020/09/29 13:51:11 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/09/29 13:51:11 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/09/29 13:51:11 [TRACE] statemgr.Filesystem: read nil snapshot

2020/09/29 13:51:11 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
2020/09/29 13:51:11 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins
Initializing provider plugins...
2020/09/29 13:51:11 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/plugins: failed to read metadata about .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: stat .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: no such file or directory
2020/09/29 13:51:11 [WARN] Failed to scan provider cache directory .terraform/plugins: failed to read metadata about .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: stat .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64: no such file or directory
- Finding latest version of hashicorp/checkly...
2020/09/29 13:51:11 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/09/29 13:51:11 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
2020/09/29 13:51:12 [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/checkly/versions
2020/09/29 13:51:12 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/hashicorp/checkly/versions
2020/09/29 13:51:12 [DEBUG] GET https://registry.terraform.io/v1/providers/-/checkly/versions
2020/09/29 13:51:12 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/-/checkly/versions

Error: Failed to install provider

Error while installing hashicorp/checkly: provider registry
registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/checkly

Expected behavior
Running terraform init returns Terraform has been successfully initialized!

TF Resource files

variable "checkly_api_key" {}

provider "checkly" {
  api_key = "var.checkly_api_key"
}

resource "checkly_check" "example-check" {
  name                      = "Example check"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true

  locations = [
    "us-west-1"
  ]

  request {
    url              = "https://api.example.com/"
    follow_redirects = true
    assertion {
      source     = "STATUS_CODE"
      comparison = "EQUALS"
      target     = "200"
    }
  }
}

Additional context
See also hashicorp/terraform#25218

Workaround
This is probably not the preferred way to fix this, but just wanted to post a workaround I found.

Replacement for curl https://raw.githubusercontent.com/checkly/terraform-provider-checkly/master/install.sh | sh:

#!/usr/bin/env bash
set -x

# Determine architecture
if [[ $(uname -s) == Darwin ]]
then
	platform='darwin_amd64'
elif [[ $(uname -s) == Linux ]]
then
	platform='linux_amd64'
else
	echo "No supported architecture found"
	exit 1
fi

jq_url_cmd=".assets[] | select(.name | endswith(\"${platform}.gz\")).browser_download_url"
jq_ver_cmd=".name | sub(\"v(?<ver>.*)\"; \"\(.ver)\")"
# Find latest binary release URL for this platform
url="$(curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest | jq -r "${jq_url_cmd}")"
# Get the version of the latest binary release (e.g. 0.6.6)
ver="$(curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest | jq -r "${jq_ver_cmd}")"
# Download the tarball
curl -OL ${url}
# Rename and copy to your Terraform plugin folder
filename=$(basename $url)
gunzip ${filename}
filename=${filename%.gz}
chmod +x ${filename}
# /Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64/terraform-provider-checkly_v0.6.6
PLUGIN_DIR=~/.terraform.d/plugins/local/checkly/checkly/$ver/$platform
mkdir -p $PLUGIN_DIR
mv $filename ${PLUGIN_DIR}/${filename%_${platform}}

Replacement TF Resource file:

terraform {
  required_version = ">= 0.13"
  required_providers {
    checkly = {
      source = "local/checkly/checkly"
      version = "0.6.6"
    }
  }
}

variable "checkly_api_key" {}

provider "checkly" {
  api_key = "var.checkly_api_key"
}

resource "checkly_check" "example-check" {
  name                      = "Example check"
  type                      = "API"
  activated                 = true
  should_fail               = false
  frequency                 = 1
  double_check              = true
  ssl_check                 = true
  use_global_alert_settings = true

  locations = [
    "us-west-1"
  ]

  request {
    url              = "https://api.example.com/"
    follow_redirects = true
    assertion {
      source     = "STATUS_CODE"
      comparison = "EQUALS"
      target     = "200"
    }
  }
}

Example run:

$ rm -rf ~/.terraform.d/

$ /tmp/install.sh
++ uname -s
+ [[ Darwin == Darwin ]]
+ platform=darwin_amd64
+ jq_url_cmd='.assets[] | select(.name | endswith("darwin_amd64.gz")).browser_download_url'
+ jq_ver_cmd='.name | sub("v(?<ver>.*)"; "\(.ver)")'
++ curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest
++ jq -r '.assets[] | select(.name | endswith("darwin_amd64.gz")).browser_download_url'
+ url=https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
++ curl -s https://api.github.com/repos/checkly/terraform-provider-checkly/releases/latest
++ jq -r '.name | sub("v(?<ver>.*)"; "\(.ver)")'
+ ver=0.6.6
+ curl -OL https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   675  100   675    0     0   1285      0 --:--:-- --:--:-- --:--:--  1285
100 12.8M  100 12.8M    0     0  2627k      0  0:00:05  0:00:05 --:--:-- 3038k
++ basename https://github.com/checkly/terraform-provider-checkly/releases/download/v0.6.6/terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ gunzip terraform-provider-checkly_v0.6.6_darwin_amd64.gz
+ filename=terraform-provider-checkly_v0.6.6_darwin_amd64
+ chmod +x terraform-provider-checkly_v0.6.6_darwin_amd64
+ PLUGIN_DIR=/Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64
+ mkdir -p /Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64
+ mv terraform-provider-checkly_v0.6.6_darwin_amd64 /Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64/terraform-provider-checkly_v0.6.6

$ tree ~/.terraform.d/
/Users/rchapman/.terraform.d/
└── plugins
    └── local
        └── checkly
            └── checkly
                └── 0.6.6
                    └── darwin_amd64
                        └── terraform-provider-checkly_v0.6.6

6 directories, 1 file

$ TF_LOG=trace terraform init -upgrade=false -get=false
2020/09/29 13:58:28 [INFO] Terraform version: 0.13.3
2020/09/29 13:58:28 [INFO] Go runtime version: go1.14.9
2020/09/29 13:58:28 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init", "-upgrade=false", "-get=false"}
2020/09/29 13:58:28 [DEBUG] Attempting to open CLI config file: /Users/rchapman/.terraformrc
2020/09/29 13:58:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/29 13:58:28 [DEBUG] checking for credentials in "/Users/rchapman/.terraform.d/plugins"
2020/09/29 13:58:28 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/09/29 13:58:28 [DEBUG] will search for provider plugins in /Users/rchapman/.terraform.d/plugins
2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: /Users/rchapman/.terraform.d/plugins is a symlink to /Users/rchapman/.terraform.d/plugins
2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: found local/checkly/checkly v0.6.6 for darwin_amd64 at /Users/rchapman/.terraform.d/plugins/local/checkly/checkly/0.6.6/darwin_amd64
2020/09/29 13:58:28 [DEBUG] ignoring non-existing provider search directory /Users/rchapman/Library/Application Support/io.terraform/plugins
2020/09/29 13:58:28 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/09/29 13:58:28 [INFO] CLI command args: []string{"init", "-upgrade=false", "-get=false"}

Initializing the backend...
2020/09/29 13:58:28 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/09/29 13:58:28 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/09/29 13:58:28 [DEBUG] New state was assigned lineage "a58556c2-6c61-6da8-66cf-676b784b6bd5"
2020/09/29 13:58:28 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/09/29 13:58:28 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/09/29 13:58:28 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins
2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: found local/checkly/checkly v0.6.6 for darwin_amd64 at .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64
2020/09/29 13:58:28 [TRACE] providercache.fillMetaCache: including .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64 as a candidate package for local/checkly/checkly 0.6.6
2020/09/29 13:58:28 [DEBUG] checking for provisioner in "."
2020/09/29 13:58:28 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/09/29 13:58:28 [DEBUG] checking for provisioner in "/Users/rchapman/.terraform.d/plugins"
2020/09/29 13:58:28 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2020/09/29 13:58:28 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/09/29 13:58:28 [TRACE] backend/local: state manager for workspace "default" will:
 - read initial snapshot from terraform.tfstate
 - write new snapshots to terraform.tfstate
 - create any backup at terraform.tfstate.backup
2020/09/29 13:58:28 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/09/29 13:58:28 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/09/29 13:58:28 [TRACE] statemgr.Filesystem: read nil snapshot
2020/09/29 13:58:28 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins

2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins
Initializing provider plugins...
2020/09/29 13:58:28 [TRACE] getproviders.SearchLocalDirectory: found local/checkly/checkly v0.6.6 for darwin_amd64 at .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64
2020/09/29 13:58:28 [TRACE] providercache.fillMetaCache: including .terraform/plugins/local/checkly/checkly/0.6.6/darwin_amd64 as a candidate package for local/checkly/checkly 0.6.6
2020/09/29 13:58:28 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
- Using previously-installed local/checkly/checkly v0.6.6

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

$ terraform providers

Providers required by configuration:
.
└── provider[local/checkly/checkly] 0.6.6

$ terraform version
Terraform v0.13.3
+ provider local/checkly/checkly v0.6.6

Locations makes more sense to be optional than mandatory

Hi there, not really a bug, but a feature request. At the moment, locations is mandatory. That contrasts with Checkly's API where it is optional. Also when creating a check in a group from Terraform, location is mandatory but does nothing, as locations is controlled by group.

All in all, I think it makes sense to make locations optional, and somehow take some location by default.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.