How am I able to execute the following command:
terraform apply
#=>
. . .
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
without the interactive prompt that follows?
You can pass the -auto-approve option to instruct Terraform to apply the plan without asking for confirmation.
Automated Terraform CLI WorkflowInitialize the Terraform working directory. Produce a plan for changing resources to match the current configuration. Have a human operator review that plan, to ensure it is acceptable. Apply the changes described by the plan.
The command line interface to Terraform is via the terraform command, which accepts a variety of subcommands such as terraform init or terraform plan .
In automation terraform apply can be run after the plan stage, passing in the plan output file. If there is no plan stage prior to the apply stage (not recommended), then the terraform apply -auto-approve option can be used.
terraform apply -auto-approve
https://www.terraform.io/docs/commands/apply.html#auto-approve
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With