0
0
Terraformcloud~10 mins

Team workflows and collaboration in Terraform - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize a Terraform working directory.

Terraform
terraform [1]
Drag options to blanks, or click blank then click option'
Aplan
Binit
Capply
Ddestroy
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' before initializing causes errors.
Confusing 'plan' with initialization.
2fill in blank
medium

Complete the code to create an execution plan without applying changes.

Terraform
terraform [1]
Drag options to blanks, or click blank then click option'
Ainit
Bvalidate
Cplan
Dapply
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'plan' applies changes immediately.
Running 'init' again when planning.
3fill in blank
hard

Fix the error in the backend configuration block to enable remote state storage.

Terraform
terraform {
  backend "[1]" {
    bucket = "my-terraform-state"
    region = "us-west-2"
  }
}
Drag options to blanks, or click blank then click option'
Alocal
Bgcs
Cazurerm
Ds3
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'local' backend disables remote state sharing.
Choosing a backend that does not match the cloud provider.
4fill in blank
hard

Fill both blanks to configure a workspace and select it for isolated environments.

Terraform
terraform [1] [2]
Drag options to blanks, or click blank then click option'
Aworkspace
Bselect
Ccreate
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'select' when switching workspaces.
Confusing 'delete' with selecting a workspace.
5fill in blank
hard

Fill all three blanks to output the value of an instance's public IP after apply.

Terraform
output "instance_ip" {
  value = [1].[2].[3]
}
Drag options to blanks, or click blank then click option'
Aaws_instance
Bmy_server
Cpublic_ip
Dprivate_ip
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'private_ip' instead of 'public_ip' for external access.
Mixing resource type and name order.