0
0
Terraformcloud~5 mins

Terraform's declarative approach - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does it mean that Terraform uses a declarative approach?
Terraform lets you declare the desired state of your infrastructure, and it figures out how to reach that state automatically.
Click to reveal answer
beginner
How does Terraform know what changes to make when you update your configuration?
Terraform compares the current state of your infrastructure with the desired state you declared, then plans and applies only the necessary changes.
Click to reveal answer
beginner
Why is Terraform's declarative approach helpful compared to manual setup?
It reduces mistakes by automating changes, ensures consistency, and makes it easy to track and repeat setups.
Click to reveal answer
intermediate
In Terraform, what file stores the current state of your infrastructure?
The terraform.tfstate file stores the current state, helping Terraform know what exists and what needs updating.
Click to reveal answer
beginner
What command in Terraform shows you the changes it will make before applying them?
The terraform plan command previews the changes Terraform will make to reach the desired state.
Click to reveal answer
What is the main idea behind Terraform's declarative approach?
ATerraform randomly changes resources
BYou write step-by-step instructions for changes
CYou manually update resources one by one
DYou declare the desired end state and Terraform figures out the steps
Which file does Terraform use to track the current infrastructure state?
Amain.tf
Bvariables.tf
Cterraform.tfstate
Doutputs.tf
What does the terraform plan command do?
ADeletes all resources
BShows the changes Terraform will make
CApplies changes immediately
DCreates a backup of your code
Why is using a declarative tool like Terraform better than manual setup?
AIt automates changes and reduces errors
BIt only works for small projects
CIt requires no learning
DIt makes changes randomly
When you update your Terraform configuration, what happens next?
ATerraform compares current and desired states and updates only what changed
BTerraform ignores the changes
CTerraform deletes everything and starts over
DTerraform asks you to manually update resources
Explain in your own words how Terraform's declarative approach works and why it is useful.
Think about how you tell Terraform what you want, not how to do it.
You got /5 concepts.
    Describe the role of the terraform.tfstate file in Terraform's workflow.
    It's like Terraform's memory of what exists.
    You got /4 concepts.