0
0
Terraformcloud~5 mins

Terraform CLI overview - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the primary purpose of the Terraform CLI?
The Terraform CLI is a tool used to manage infrastructure as code. It helps create, change, and improve infrastructure safely and efficiently.
Click to reveal answer
beginner
What does the terraform init command do?
It prepares your working directory by downloading necessary provider plugins and setting up the backend for storing state.
Click to reveal answer
beginner
Explain the role of terraform plan.
This command shows what changes Terraform will make to your infrastructure without applying them. It helps you review before making changes.
Click to reveal answer
beginner
What happens when you run terraform apply?
Terraform applies the planned changes to your infrastructure, creating, updating, or deleting resources as needed.
Click to reveal answer
beginner
Why is terraform destroy used?
It removes all resources managed by your Terraform configuration, effectively cleaning up your infrastructure.
Click to reveal answer
Which Terraform CLI command initializes the working directory?
Aterraform destroy
Bterraform plan
Cterraform apply
Dterraform init
What does terraform plan show you?
AThe changes Terraform will make
BThe current state of your infrastructure
CThe list of available providers
DThe logs of previous runs
Which command applies changes to your infrastructure?
Aterraform apply
Bterraform plan
Cterraform init
Dterraform validate
What is the effect of running terraform destroy?
AIt updates resources
BIt deletes all managed resources
CIt initializes the directory
DIt shows a plan
Before running terraform apply, what should you do to avoid surprises?
ARun terraform destroy
BRun terraform init
CRun terraform plan
DRun terraform validate
Describe the main Terraform CLI commands and their purposes.
Think about the workflow from setup to cleanup.
You got /4 concepts.
    Explain why it is important to run terraform plan before terraform apply.
    Consider how you check your work before making changes.
    You got /3 concepts.