Created
August 5, 2022 08:17
-
-
Save ignaloidas/2764d3345233bf562cce093db5f9df29 to your computer and use it in GitHub Desktop.
CDKTF problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ CDKTF_LOG_LEVEL=debug cdktf deploy | |
[2022-08-05T11:16:22.412] [INFO] default - Error reporting disabled: SENTRY_DSN not set | |
[2022-08-05T11:16:22.435] [DEBUG] default - { | |
"terraform_version": "1.2.6", | |
"platform": "linux_amd64", | |
"provider_selections": {}, | |
"terraform_outdated": false | |
} | |
[2022-08-05T11:16:22.437] [DEBUG] default - { | |
"terraform_version": "1.2.6", | |
"platform": "linux_amd64", | |
"provider_selections": {}, | |
"terraform_outdated": false | |
} | |
[2022-08-05T11:16:22.438] [DEBUG] default - v18.7.0 | |
[2022-08-05T11:16:22.473] [DEBUG] default - Terraform v1.2.6 | |
on linux_amd64 | |
0 Stacks deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:29.713] [DEBUG] default - Checking for stacks with unmet dependencies | |
[2022-08-05T11:16:29.713] [DEBUG] default - stack executors: [ | |
AM { | |
options: { | |
stackNames: [], | |
autoApprove: false, | |
ignoreMissingStackDependencies: false, | |
parallelism: -1, | |
refreshOnly: false, | |
stack: [Object], | |
onUpdate: [Function (anonymous)], | |
onLog: [Function (anonymous)], | |
abortSignal: [Vq [AbortSignal]] | |
}, | |
stopped: false, | |
currentState: 'idle', | |
stack: { | |
name: 'cdktf_problem', | |
constructPath: 'cdktf_problem', | |
workingDirectory: 'cdktf.out/stacks/cdktf_problem', | |
synthesizedStackPath: 'stacks/cdktf_problem/cdk.tf.json', | |
annotations: [], | |
dependencies: [], | |
content: '{\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "backend": "local",\n' + | |
' "stackName": "cdktf_problem",\n' + | |
' "version": "0.12.0"\n' + | |
' },\n' + | |
' "outputs": {}\n' + | |
' },\n' + | |
' "provider": {\n' + | |
' "aws": [\n' + | |
' {}\n' + | |
' ]\n' + | |
' },\n' + | |
' "resource": {\n' + | |
' "aws_acm_certificate": {\n' + | |
' "AcmCertificate": {\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "path": "cdktf_problem/AcmCertificate",\n' + | |
' "uniqueId": "AcmCertificate"\n' + | |
' }\n' + | |
' },\n' + | |
' "domain_name": "*.example.com",\n' + | |
' "subject_alternative_names": [\n' + | |
' "example.com"\n' + | |
' ],\n' + | |
' "validation_method": "DNS"\n' + | |
' }\n' + | |
' },\n' + | |
' "aws_route53_record": {\n' + | |
' "ValidationRecords": {\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "path": "cdktf_problem/ValidationRecords",\n' + | |
' "uniqueId": "ValidationRecords"\n' + | |
' }\n' + | |
' },\n' + | |
' "allow_overwrite": true,\n' + | |
' "for_each": "${toset(tolist(aws_acm_certificate.AcmCertificate.domain_validation_options))}",\n' + | |
' "name": "${each.value[\\"resource_record_name\\"]}",\n' + | |
' "records": [\n' + | |
' "${each.value[\\"resource_record_value\\"]}"\n' + | |
' ],\n' + | |
' "ttl": 300,\n' + | |
' "type": "${each.value[\\"resource_record_type\\"]}",\n' + | |
' "zone_id": "EXAMPLE_ID"\n' + | |
' }\n' + | |
' }\n' + | |
' },\n' + | |
' "terraform": {\n' + | |
' "backend": {\n' + | |
' "local": {\n' + | |
' "path": "/home/ignas/Documents/tests/cdktf_problem/terraform.cdktf_problem.tfstate"\n' + | |
' }\n' + | |
' },\n' + | |
' "required_providers": {\n' + | |
' "aws": {\n' + | |
' "source": "aws",\n' + | |
' "version": "4.24.0"\n' + | |
' }\n' + | |
' }\n' + | |
' }\n' + | |
'}' | |
} | |
} | |
] | |
[2022-08-05T11:16:29.717] [DEBUG] default - pending stacks: [ | |
AM { | |
options: { | |
stackNames: [], | |
autoApprove: false, | |
ignoreMissingStackDependencies: false, | |
parallelism: -1, | |
refreshOnly: false, | |
stack: [Object], | |
onUpdate: [Function (anonymous)], | |
onLog: [Function (anonymous)], | |
abortSignal: [Vq [AbortSignal]] | |
}, | |
stopped: false, | |
currentState: 'idle', | |
stack: { | |
name: 'cdktf_problem', | |
constructPath: 'cdktf_problem', | |
workingDirectory: 'cdktf.out/stacks/cdktf_problem', | |
synthesizedStackPath: 'stacks/cdktf_problem/cdk.tf.json', | |
annotations: [], | |
dependencies: [], | |
content: '{\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "backend": "local",\n' + | |
' "stackName": "cdktf_problem",\n' + | |
' "version": "0.12.0"\n' + | |
' },\n' + | |
' "outputs": {}\n' + | |
' },\n' + | |
' "provider": {\n' + | |
' "aws": [\n' + | |
' {}\n' + | |
' ]\n' + | |
' },\n' + | |
' "resource": {\n' + | |
' "aws_acm_certificate": {\n' + | |
' "AcmCertificate": {\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "path": "cdktf_problem/AcmCertificate",\n' + | |
' "uniqueId": "AcmCertificate"\n' + | |
' }\n' + | |
' },\n' + | |
' "domain_name": "*.example.com",\n' + | |
' "subject_alternative_names": [\n' + | |
' "example.com"\n' + | |
' ],\n' + | |
' "validation_method": "DNS"\n' + | |
' }\n' + | |
' },\n' + | |
' "aws_route53_record": {\n' + | |
' "ValidationRecords": {\n' + | |
' "//": {\n' + | |
' "metadata": {\n' + | |
' "path": "cdktf_problem/ValidationRecords",\n' + | |
' "uniqueId": "ValidationRecords"\n' + | |
' }\n' + | |
' },\n' + | |
' "allow_overwrite": true,\n' + | |
' "for_each": "${toset(tolist(aws_acm_certificate.AcmCertificate.domain_validation_options))}",\n' + | |
' "name": "${each.value[\\"resource_record_name\\"]}",\n' + | |
' "records": [\n' + | |
' "${each.value[\\"resource_record_value\\"]}"\n' + | |
' ],\n' + | |
' "ttl": 300,\n' + | |
' "type": "${each.value[\\"resource_record_type\\"]}",\n' + | |
' "zone_id": "EXAMPLE_ID"\n' + | |
' }\n' + | |
' }\n' + | |
' },\n' + | |
' "terraform": {\n' + | |
' "backend": {\n' + | |
' "local": {\n' + | |
' "path": "/home/ignas/Documents/tests/cdktf_problem/terraform.cdktf_problem.tfstate"\n' + | |
' }\n' + | |
' },\n' + | |
' "required_providers": {\n' + | |
' "aws": {\n' + | |
' "source": "aws",\n' + | |
' "version": "4.24.0"\n' + | |
' }\n' + | |
' }\n' + | |
' }\n' + | |
'}' | |
} | |
} | |
1 Stack deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:29.766] [DEBUG] default - | |
Initializing the backend... | |
cdktf_problem Initializing the backend... | |
1 Stack deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:30.462] [DEBUG] default - | |
Initializing provider plugins... | |
- Reusing previous version of hashicorp/aws from the dependency lock file | |
[2022-08-05T11:16:30.462] [DEBUG] default - [cdktf_problem](init): | |
cdktf_problem Initializing provider plugins... | |
- Reusing previous version of hashicorp/aws from the dependency lock file | |
1 Stack deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:31.470] [DEBUG] default - - Using previously-installed hashicorp/aws v4.24.0 | |
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. | |
[2022-08-05T11:16:31.471] [DEBUG] default - [cdktf_problem](init): - Using previously-installed hashicorp/aws v4.24.0 | |
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, | |
cdktf_problem - Using previously-installed hashicorp/aws v4.24.0 | |
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. | |
1 Stack deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:33.657] [ERROR] default - ╷ | |
│ Error: Invalid for_each argument | |
│ | |
│ on cdk.tf.json line 42, in resource.aws_route53_record.ValidationRecords: | |
│ 42: "for_each": "${toset(tolist(aws_acm_certificate.AcmCertificate.domain_validation_options))}", | |
│ ├──────────────── | |
│ │ aws_acm_certificate.AcmCertificate.domain_validation_options is set of object with 2 elements | |
│ | |
│ The "for_each" set includes values derived from resource attributes that | |
│ cannot be determined until apply, and so Terraform cannot determine the | |
│ full set of keys that will identify the instances of this resource. | |
│ | |
│ When working with unknown values in for_each, it's better to use a map | |
│ value where the keys are defined statically in your configuration and where | |
│ only the values contain apply-time results. | |
│ | |
│ Alternatively, you could use the -target planning option to first apply | |
│ only the resources that the for_each value depends on, and then apply a | |
│ second time to fully converge. | |
╵ | |
[2022-08-05T11:16:33.658] [DEBUG] default - [cdktf_problem](plan): ╷ | |
│ Error: Invalid for_each argument | |
│ | |
│ on cdk.tf.json line 42, in resource.aws_route53_record.ValidationRecords: | |
│ 42: "for_each": "${toset(tolist(aws_acm_certificate.AcmCertificate.domain_validation_options))}", | |
│ ├──────────────── | |
│ │ aws_acm_certificate.AcmCertificate.domain_validation_options is set of object with 2 elements | |
│ | |
│ The "for_each" set includes values derived from resource attributes that | |
│ cannot be determined until apply, and so Terraform cannot determine the | |
│ full set of keys that will identify the instances of this resource. | |
│ | |
│ When working with unknown values in for_each, it's better to use a map | |
│ value where the keys are defined statically in your configuration and where | |
│ only the values contain apply-time results. | |
│ | |
│ Alternatively, you could use the -target planning option to first apply | |
│ only the resources that the for_each value depends on, and then apply a | |
cdktf_problem ╷ | |
│ Error: Invalid for_each argument | |
│ | |
│ on cdk.tf.json line 42, in resource.aws_route53_record.ValidationRecords (ValidationRecords): | |
│ 42: "for_each": "${toset(tolist(aws_acm_certificate.AcmCertificate (AcmCertificate).domain_validation_options))}", | |
│ ├──────────────── | |
│ │ aws_acm_certificate.AcmCertificate (AcmCertificate).domain_validation_options is set of object with 2 elements | |
│ | |
│ The "for_each" set includes values derived from resource attributes that | |
│ cannot be determined until apply, and so Terraform cannot determine the | |
│ full set of keys that will identify the instances of this resource. | |
│ | |
│ When working with unknown values in for_each, it's better to use a map | |
│ value where the keys are defined statically in your configuration and where | |
│ only the values contain apply-time results. | |
│ | |
│ Alternatively, you could use the -target planning option to first apply | |
│ only the resources that the for_each value depends on, and then apply a | |
│ second time to fully converge. | |
╵ | |
1 Stack deploying 0 Stacks done 0 Stacks waiting | |
[2022-08-05T11:16:33.670] [DEBUG] default - [cdktf_problem]: errored | |
non-zero exit code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment