shamon shamsudeen
shamon shamsudeen

Reputation: 5858

Terragrunt auto apply

I am trying to run terragrunt with auto-apply for that I've used cli flag --terragrunt-working-dir

From the documentation

When passed in, don’t show interactive user prompts. This will default the answer for all prompts to ‘yes’

The command which I tried is

terragrunt apply --terragrunt-non-interactive --terragrunt-working-dir <dir>

But it still asks for me the prompt

terragrunt version v0.23.2

Upvotes: 3

Views: 12891

Answers (3)

saket jain
saket jain

Reputation: 35

These are the two ways to skip the prompt and do same as terraform apply -auto-approve

For anyone who still wants auto approve with apply-all. I got a workarounds by using bash hack

echo "Y" | terragrunt apply-all

If you want to skip terragrunt's prompts, then use:

terragrunt run-all apply --terragrunt-non-interactive

Upvotes: 4

mclavel
mclavel

Reputation: 51

With terraform v0.14.10 and terragrunt v0.28.21 you can use:

terragrunt apply/destroy -auto-approve --terragrunt-working-dir <dir>

Upvotes: 1

arraen
arraen

Reputation: 171

Terragrunt is a thin wrapper around terraform, so command-line flags you send that aren't Terragrunt specific will go to the terraform command.

You need to add the terraform apply command-line flag -auto-approve to have it skip the "yes" prompt:

terragrunt [your other flags] -auto-approve

Upvotes: 16

Related Questions