0
0
Terraformcloud~5 mins

Terraform apply for execution - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the terraform apply command do?
It executes the planned changes to create, update, or delete infrastructure resources as defined in the Terraform configuration files.
Click to reveal answer
beginner
Why is it recommended to run terraform plan before terraform apply?
Because terraform plan shows the changes Terraform will make, helping you review and avoid unexpected modifications before applying them.
Click to reveal answer
intermediate
What happens if you run terraform apply without a saved plan file?
Terraform will create a new plan automatically and prompt you to approve it before applying the changes.
Click to reveal answer
intermediate
How can you apply a previously saved plan file with Terraform?
Use terraform apply <plan-file-name> to apply the exact changes from the saved plan without re-planning.
Click to reveal answer
intermediate
What is the purpose of the -auto-approve flag in terraform apply?
It skips the interactive approval prompt and applies changes immediately, useful for automation but should be used carefully.
Click to reveal answer
What does terraform apply primarily do?
ADeletes all infrastructure immediately
BOnly shows planned changes without applying
CCreates or updates infrastructure based on configuration
DValidates syntax of configuration files
Which command should you run before terraform apply to review changes?
Aterraform destroy
Bterraform plan
Cterraform init
Dterraform validate
What happens if you use terraform apply -auto-approve?
ATerraform cancels the apply process
BTerraform will ask for confirmation before applying
CTerraform only creates a plan but does not apply
DTerraform applies changes without asking for confirmation
How do you apply a saved plan file named myplan.tfplan?
Aterraform apply myplan.tfplan
Bterraform plan myplan.tfplan
Cterraform init myplan.tfplan
Dterraform destroy myplan.tfplan
If you run terraform apply without a plan file, what happens?
ATerraform creates a new plan and asks for approval
BTerraform deletes all resources
CTerraform fails with an error
DTerraform skips applying changes
Explain the purpose and typical workflow of the terraform apply command.
Think about how Terraform changes your cloud setup after planning.
You got /4 concepts.
    Describe how to safely automate Terraform apply in a CI/CD pipeline.
    Automation means no manual approval but still safe.
    You got /4 concepts.