(aws-cdk): IAM Diff CLI error due to updates in `tables` dependency
See original GitHub issueThe table dependency recently updated their validation to not allow additional properties. The CloudFormation diff however, seems to be using an unknown property useWordWrap
.
This results in the CLI terminating prematurely and printing an error in the table dependency.
Reproduction Steps
- Setup a project with IAM changes
- Run
cdk diff
What did you expect to happen?
A diff should be output.
What actually happened?
❯ yarn cdk diff
yarn run v1.22.5
$ cdk diff
Stack ProjectStack
IAM Statement Changes
config {
border: {
topBody: '\u001b[90m─\u001b[39m',
topJoin: '\u001b[90m┬\u001b[39m',
topLeft: '\u001b[90m┌\u001b[39m',
topRight: '\u001b[90m┐\u001b[39m',
bottomBody: '\u001b[90m─\u001b[39m',
bottomJoin: '\u001b[90m┴\u001b[39m',
bottomLeft: '\u001b[90m└\u001b[39m',
bottomRight: '\u001b[90m┘\u001b[39m',
bodyLeft: '\u001b[90m│\u001b[39m',
bodyRight: '\u001b[90m│\u001b[39m',
bodyJoin: '\u001b[90m│\u001b[39m',
joinBody: '\u001b[90m─\u001b[39m',
joinLeft: '\u001b[90m├\u001b[39m',
joinRight: '\u001b[90m┤\u001b[39m',
joinJoin: '\u001b[90m┼\u001b[39m'
},
columns: {
'0': { width: 1, useWordWrap: true },
'1': { width: 13, useWordWrap: true },
'2': { width: 6, useWordWrap: true },
'3': { width: 13, useWordWrap: true },
'4': { width: 13, useWordWrap: true },
'5': { width: 14, useWordWrap: true }
},
drawHorizontalLine: [Function: drawHorizontalLine]
}
errors [
{
dataPath: '/columns/0',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
},
{
dataPath: '/columns/1',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
},
{
dataPath: '/columns/2',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
},
{
dataPath: '/columns/3',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
},
{
dataPath: '/columns/4',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
},
{
dataPath: '/columns/5',
message: 'should NOT have additional properties',
params: { additionalProperty: 'useWordWrap' },
schemaPath: '#/additionalProperties'
}
]
Invalid config.
Environment
- CDK CLI Version : v1.81.0
- Framework Version: v1.81.0
- Node.js Version: v12.4.0
- OS : MacOS Big Sur 11.0.1
- Language (Version): TypeScript 4.1.3
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK. After updating the AWS CDK, the AWS CDK Toolkit (CLI)...
Read more >Dependency stacks cause update failure · Issue #3414 - GitHub
The dependency has been declared - stack-lab-ecc depends on stack-lab-edu2. When EC2 is commented out (diff):. image. The deploy fails trying to ...
Read more >CDK tips, part 3 – how to unblock cross-stack references
In part 3 of the "CDK tips" series, I want to talk about dealing with a common problem: getting stuck while trying to...
Read more >AWS CDK Toolkit - npm
CDK Toolkit, the command line tool for CDK apps. Latest version: 2.56.1, last published: 2 days ago. Start using aws-cdk in your project...
Read more >Automate AWS lambda function deployments with AWS CDK
You will also need to install AWS CLI and AWS CDK CLI on your system ... and then updates the DynamoDB table with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note to maintainers, this issue can block deployments as
cdk deploy
will run a diff first by default to show IAM changes.Workaround for blocked deployments is to rollback to previous version or add
--require-approval never
.Seems there’s an upgrade to “table” package which is breaking the diff command. Try to add the following to package.json:
Worked for me (running cdk 1.78.0 and 1.82.0). It is a temporary fix until the issue is solved.