question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

package/tools: Force deploy flag does not work

See original GitHub issue

Running cdk deploy stack-name --require-approval never --force does not work. Specifically its skips updating the stack with (no changes) outputted in the command line. I’ve also tried the following patterns:

  • cdk deploy stack-name --force
  • cdk deploy --force stack-name

Reproduction Steps

Repo is private so cannot link but simply running one of the above commands with cdk toolkit version 1.108.0 should suffice. I can try and reproduce in a public repo if the person seeing this cannot reproduce.

What did you expect to happen?

CDK would never skip updating stacks due to “no changes” in the template when the --force flag is passed.

What actually happened?

CDK skips updating stacks due to “no changes” in the template when the --force flag is passed.

Environment

  • **CDK CLI Version: ** 1.108.0
  • Framework Version: 1.108.0
  • Node.js Version: v12.22.0
  • OS : MacOs Big Sur
  • Language (Version): TS 4.2.4

Other

 ✅  service-name (no changes)

This is 🐛 Bug Report

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
jeffthamcommented, Oct 29, 2021

cdk deploy --force should force cloudformation to redeploy without consider the change-sets.

I have tested it. A codepipeline is created by my cdk project. Then I add a step manually in the codepipeline, and redeploy cdk project to force it change back to the defined stage. However, cdk deploy --force is not working as expected. From cloudformation point of view, nothing is change. That’s mean, this --force option is helpless.

7reactions
markuspxpxcommented, Dec 8, 2021

I agree with @jefftham , we should be able to overwrite the Cloudformation rule using --force, to literally force to deploy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI tools OpenShift Container Platform 4.9
The flag is set once and no merging takes place. If the $KUBECONFIG environment variable is set, then it is used. The variable...
Read more >
Conan Documentation
Conan is a software package manager which is intended for C and C++ developers. Conan is universal and portable. It works in all...
Read more >
Task force mobilization - FEMA
The task force will continue to operate until demobilized. This will usually occur within 10 days after deployment to the disaster area.
Read more >
Yocto Project Reference Manual
In particular, the Yocto Project does not support and currently has no plans ... sequence forces recompilation after changing files in the work...
Read more >
Chapter 2. Debian package management
Do not ever install random packages by " dpkg --force-all -i random_package ". ... Learn the package system infrastructure enough to work around...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found