Describe the bug
After adding tags to the local cdk.json, cdk deploy fails with an InvalidParameterType: Expected params.Tags to be an Array from aws-sdk.
Expected Behavior
The synthesized template deploys with the tags in cdk.json.
Current Behavior
❯ cdk deploy
✨ Synthesis time: 3.04s
HelloCdkStack: deploying...
[0%] start: Publishing 774231a5b4dfea162ee0964f8335b364aee003aa142c95fb1c4d3e49537db261:current_account-current_region
[100%] success: Published 774231a5b4dfea162ee0964f8335b364aee003aa142c95fb1c4d3e49537db261:current_account-current_region
HelloCdkStack: creating CloudFormation changeset...
❌ HelloCdkStack failed: InvalidParameterType: Expected params.Tags to be an Array
at ParamValidator.fail (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:50:37)
at ParamValidator.validateType (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:233:10)
at ParamValidator.validateList (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:100:14)
at ParamValidator.validateMember (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:91:21)
at ParamValidator.validateStructure (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:76:14)
at ParamValidator.validateMember (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:89:21)
at ParamValidator.validate2 [as validate] (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/param_validator.js:34:10)
at Request.VALIDATE_PARAMETERS (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/event_listeners.js:132:42)
at Request.callListeners (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at callNextListener (/opt/homebrew/Cellar/aws-cdk/2.29.0/libexec/lib/node_modules/aws-sdk/lib/sequential_executor.js:96:12) {
code: 'InvalidParameterType',
time: 2022-06-24T02:18:15.714Z
}
Expected params.Tags to be an Array
Reproduction Steps
mkdir hello-cdk
cd hello-cdk
cdk init app --language typescript
cdk deploy
So far this works.
- Replace cdk.json with this cdk.json.
cdk deploy
This fails.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.29.0 (build 47d7ec4)
Framework Version
No response
Node.js Version
v16.15.1
OS
macOS 12.4 arm64
Language
Typescript
Language Version
4.7.4
Other information
Documentation reference: https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-config
tags - JSON object containing tags (key-value pairs) for the stack.
Describe the bug
After adding tags to the local cdk.json,
cdk deployfails with anInvalidParameterType: Expected params.Tags to be an Arrayfrom aws-sdk.Expected Behavior
The synthesized template deploys with the tags in cdk.json.
Current Behavior
Reproduction Steps
mkdir hello-cdkcd hello-cdkcdk init app --language typescriptcdk deploySo far this works.
cdk deployThis fails.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.29.0 (build 47d7ec4)
Framework Version
No response
Node.js Version
v16.15.1
OS
macOS 12.4 arm64
Language
Typescript
Language Version
4.7.4
Other information
Documentation reference: https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-config