Open JohnYoungers opened 10 months ago
Hi @JohnYoungers ,thanks for reaching out. You could try using this flag "--force" - https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/README.md#cdk-deploy
cdk deploy --force -v
Here is a detailed explanation of how to use '--force'.
Let us know if this works for you.
Hi @khushail - adding --force -v
seems to result in the same behavior:
[12:06:49] Command line arguments: {
_: [ 'deploy' ],
force: true,
f: true,
v: 1,
verbose: 1,
...
...
[12:07:05] my-stack: checking if we can skip deploy
[12:07:05] my-stack: forced deployment
[12:07:05] my-stack: deploying...
[12:07:05] Removing existing change set with name cdk-deploy-change-set if it exists
[12:07:05] Attempting to create ChangeSet with name cdk-deploy-change-set to update stack my-stack
my-stack: creating CloudFormation changeset...
[12:07:05] Initiated creation of changeset: arn:aws:cloudformation:us-east-1:{account}:changeSet/cdk-deploy-change-set/{guid}; waiting for it to finish creating...
[12:07:05] Waiting for changeset cdk-deploy-change-set on stack my-stack to finish creating...
[12:07:06] No changes are to be performed on my-stack.
[12:07:06] Deleting empty change set arn:aws:cloudformation:us-east-1:{account}:changeSet/cdk-deploy-change-set/{guid}
We had the same issue, even though for us it was not an issue. However, since recently we can see that behavior changed, now metadata updates are not only showing in diff, but lead to a Stack update. Not sure if a change in Cloudformation or CDK caused this.
Describe the bug
I have an embedded secret resolve that I'd like re-calculated on-demand for a given stack: it sounds like the easiest way to accomplish this is to add an item to the template that will result in a small change in order to trigger checking the secret's latest value.
To do so I've added this to the example stack:
this.addMetadata("SecretResolveTrigger", new Date());
Running
cdk diff
will display the change:However, running
cdk deploy
will not update the value:Is there a way to update the template even when there are no changes? Or is there a better way to re-trigger an embedded resolve?
Expected Behavior
I'd expect the metadata to be updated in the template even though no other resource was updated
Current Behavior
Nothing is updated in cloudformation
Reproduction Steps
Create a stack, including an
.addMetadata("SecretResolveTrigger", new Date());
entry, and runnpx cdk deploy
twice: notice the metadata was not updated the second timePossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.81.0
Framework Version
No response
Node.js Version
21.2.0
OS
Windows 10
Language
TypeScript
Language Version
5.2.2
Other information
No response