Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to run the deployment 'npx cdk deploy' without additional confirmation #445

Open
alexeyshishkin01 opened this issue Apr 5, 2024 · 6 comments
Labels
question Further information is requested

Comments

@alexeyshishkin01
Copy link

Dear all,

I am trying to automate the deployment, but unfortunately even if I use 'npx cdk deploy --all --force' there's still a need for for confirmation: 'Do you wish to deploy these changes (y/n)?'

If there's a way to run the deployment without additional confirmation ?

best regards
Alexey Shishkin

@massi-ang
Copy link
Collaborator

massi-ang commented Apr 9, 2024

Try adding --method=direct

@massi-ang massi-ang added the question Further information is requested label Apr 9, 2024
@alexeyshishkin01
Copy link
Author

according to the 'npx cdk deploy --help':

-m, --method How to perform the deployment. Direct is a bit faster but lacks progress information [string] [choices: "direct", "change-set", "prepare-change-set"]

it does not specify anything about confirmation, but OK, let me try ...

on the other hand:
--all Deploy all available stacks [boolean] [default: false]
-f, --force Always deploy stack even if templates are identical [boolean] [default: false]

they are supposed to work, but they did not

@alexeyshishkin01
Copy link
Author

this is to confirm 'npx cdk deploy --method=direct' asks for confirmation as well

@massi-ang
Copy link
Collaborator

massi-ang commented Apr 10, 2024

I forgot to mention to add --require-approval never. --all is not necessary since there is a single stack in this project. Do not use --force

@massi-ang massi-ang reopened this Apr 10, 2024
@alexeyshishkin01
Copy link
Author

So, what is going to be the final suggestion from your side ?

Is it 'npx cdk deploy --method=direct --require-approval never' ?

@alexeyshishkin01
Copy link
Author

this is to confirm the command 'npx cdk deploy --method=direct --require-approval never' does the job
pls. update the documentation mentioning this command as a way to run deployment of the application non-interactively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

2 participants