0
0
Terraformcloud~20 mins

Terraform CLI overview - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Terraform CLI Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Terraform CLI: Understanding terraform init

What is the primary effect of running terraform init in a new Terraform project directory?

AIt initializes the backend, downloads provider plugins, and prepares the working directory.
BIt applies the planned infrastructure changes to the cloud provider.
CIt generates a plan showing what changes Terraform will make.
DIt destroys all existing infrastructure managed by Terraform.
Attempts:
2 left
💡 Hint

Think about what setup steps Terraform needs before managing infrastructure.

service_behavior
intermediate
2:00remaining
Terraform CLI: terraform plan output

After running terraform plan, what does the output primarily show?

AThe list of all Terraform commands available.
BThe current state of all resources in the cloud provider.
CA summary of the infrastructure changes Terraform will make if applied.
DThe detailed logs of the last apply operation.
Attempts:
2 left
💡 Hint

Consider what you want to see before making changes.

Configuration
advanced
2:00remaining
Terraform CLI: Correct command to apply changes

Which Terraform CLI command applies the planned infrastructure changes to the cloud provider?

Aterraform apply
Bterraform init
Cterraform plan
Dterraform validate
Attempts:
2 left
💡 Hint

Think about which command actually makes changes.

security
advanced
2:00remaining
Terraform CLI: Handling sensitive data

Which Terraform CLI command helps check if your configuration files are syntactically valid and can catch errors before applying?

Aterraform destroy
Bterraform plan
Cterraform apply
Dterraform validate
Attempts:
2 left
💡 Hint

Think about a command that checks correctness without making changes.

Architecture
expert
2:00remaining
Terraform CLI: Understanding terraform destroy behavior

What is the result of running terraform destroy in a Terraform-managed infrastructure?

AIt only deletes resources that were manually created outside Terraform.
BIt deletes all resources managed by Terraform in the current state.
CIt creates a backup of the current infrastructure state without deleting resources.
DIt updates the infrastructure to match the latest configuration without deleting anything.
Attempts:
2 left
💡 Hint

Consider what 'destroy' means in Terraform context.