[CLI] Parameters are ignored for all subsequent deployments
See original GitHub issue❓ General Issue
The Question
When deploying a stack using parameters, changes are not detected for any deployment after the initial one. Using this simple stack :
import * as cdk from '@aws-cdk/core';
import { CfnParameter, Fn } from '@aws-cdk/core';
import { CfnBucket } from '@aws-cdk/aws-s3';
export class CdkStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const parameter = new CfnParameter(this, "parameter",
{
type: 'String'
});
const bucket = new CfnBucket(this, "bucket", {
tags: [
{key: 'tag', value: Fn.ref(parameter.logicalId)}
]
});
}
}
The tag is set to “value” using this deployment code :
cdk deploy --parameters CdkStack:parameter=value
But for any subsequent deployments changes are not detected when using a different parameter:
cdk deploy --parameters CdkStack:parameter=newvalue
Using the previous-parameters flag result to the same output:
cdk deploy --previous-parameters false --parameters CdkStack:parameter=newvalue
CdkStack: deploying...
✅ CdkStack (no changes)
Environment
- CDK CLI Version: 1.46.0 (build 63860b2)
- Node.js Version: v12.15.0
- OS: Windows 10
- Language: Tested with TypeScript & C#
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
deploy — AWS CLI 1.27.37 Command Reference
Deploys the specified AWS CloudFormation template by creating and then executing a change set. The command terminates after AWS CloudFormation executes the ...
Read more >How do I use the "Ignored Build Step" field on Vercel?
An example Ignored Build Step command where only commits made from the branches "main" and "staging" are allowed to be deployed.
Read more >Use command-line parameters to install Visual Studio
The subsequent optional command line parameters, which are all prefixed ... This is required for the install command, and ignored for other ...
Read more >A weblogic.Deployer Command-Line Reference
Deployer should ignore all version related code paths on the Administration Server. This behavior is useful when deployment source files are located on...
Read more >Compose file version 3 reference - Docker Documentation
This section contains a list of all configuration options supported by a service ... The build option is ignored when deploying a stack...
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
@shivlaks Yes this is working using
--force
As a result for my example :This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.