[aws-events] `cdk diff` shows difference, but `cdk deploy` tells no changes
See original GitHub issueI’m not sure whether this issue is involved with aws-events
or cdk diff
.
Reproduction Steps
I have deployed this resource:
import * as events from '@aws-cdk/aws-events'
new events.Rule(this, 'rule', {
eventPattern: {
detail: {
type: ['대한민국'], // Any non-single byte characters
},
}
)
cdk diff
always tells there is a difference even though it has been deployed.
$ cdk diff <stack>
Stack <stack>
Resources
[~] AWS::Events::Rule rule rule5EE78A73
└─ [~] EventPattern
└─ [~] .detail:
└─ [~] .type:
└─ @@ -1,3 +1,3 @@
[ ] [
[-] "????"
[+] "대한민국"
[ ] ]
But when I tried to deploy again, it tells:
$ cdk deploy <stack>
<stack>
<stack>: deploying...
<stack>: creating CloudFormation changeset...
✅ <stack> (no changes)
What did you expect to happen?
$ cdk diff <stack>
✅ <stack> (no changes)
What actually happened?
$ cdk diff <stack>
Stack <stack>
Resources
[~] AWS::Events::Rule rule rule5EE78A73
└─ [~] EventPattern
└─ [~] .detail:
└─ [~] .type:
└─ @@ -1,3 +1,3 @@
[ ] [
[-] "????"
[+] "대한민국"
[ ] ]
Environment
- CLI Version : aws-cli/2.0.45 Python/3.8.5 Darwin/19.6.0 source/x86_6
- Framework Version: aws-cdk 1.62.0
- Node.js Version: v14.9.0
- OS : macOS Catalina
- Language (Version): TypeScript 4.0.2
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
CDK not updating - Stack Overflow
because CDK uses Cloudformation, it performs an action to determine a ChangeSet. This is to say, if it doesn't think anything has changed, ......
Read more >What's new with AWS CloudFormation and AWS CDK
Join this session to learn about new features to up-level your infrastructure-as-code (IaC) experiences on AWS. It covers working with AWS ...
Read more >AWS CDK Toolkit (cdk command) - AWS Documentation
The AWS CDK Toolkit, the CLI command cdk , is the primary tool for interacting with your AWS CDK app. It executes your...
Read more >AWS CDK Toolkit - npm
This command returns non-zero if any differences are found. $ # Diff against the currently deployed stack $ cdk diff --app='node bin/main.js' MyStackName ......
Read more >@aws-cdk/aws-events | Yarn - Package Manager
Events: An event indicates a change in your AWS environment. AWS resources can generate events when their state changes. For example, Amazon EC2...
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
I was facing the same issues on a different resource when trying to update the DeletionPolicy - but I found this in the CloudFormation documentation: https://docs.amazonaws.cn/en_us/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-get-template.html
Same problem changing ONLY DeletionPolicy