DataDog/terraform-aws-lambda-datadog

Cannot run - "Blocks of type 'check' are not expected here"

OmpahDev opened this issue · 3 comments

I'm using Terraform 1.4.0 and AWS provider version 5.57 (both of which meet the requirements mentioned in README.md)

When attempting to use this module, terraform init fails with the following error:

Initializing the backend...
Initializing modules...
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
╷
│ Error: Unsupported block type
│
│   on .terraform\modules\lambda-datadog\main.tf line 93:
│   93: check "runtime_support" {
│
│ Blocks of type "check" are not expected here.
╵

╷
│ Error: Unsupported block type
│
│   on .terraform\modules\lambda-datadog\main.tf line 118:
│  118: check "container_image_support" {
│
│ Blocks of type "check" are not expected here.

Update - I was able to resolve the issue by upgrading to Terraform 1.9.1.

The README.md Terraform version requirement (https://github.com/DataDog/terraform-aws-lambda-datadog/blob/main/README.md?plain=1#L202) must be incorrect.

@OmpahDev The required version is indeed incorrect. Thanks for reporting this! I'll update here once the fix is released