0
0
Terraformcloud~10 mins

Remote execution model 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 specify the backend type for remote execution.

Terraform
terraform {
  backend "[1]" {}
}
Drag options to blanks, or click blank then click option'
As3
Bremote
Chttp
Dlocal
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'local' backend which stores state locally, not remotely.
Using 'remote' which is not a valid backend type.
Using 'http' which is for HTTP backend, not typical for remote execution.
2fill in blank
medium

Complete the code to enable remote execution with Terraform Cloud.

Terraform
terraform {
  backend "remote" {
    [1] = "my-terraform-org"
  }
}
Drag options to blanks, or click blank then click option'
Abucket
Borganization
Cworkspace
Dregion
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'workspace' with 'organization'.
Using 'bucket' which is for S3 backends.
Using 'region' which is not used in remote backend config.
3fill in blank
hard

Fix the error in the backend configuration to specify the workspace name.

Terraform
terraform {
  backend "remote" {
    organization = "my-org"
    [1] = "my-workspace"
  }
}
Drag options to blanks, or click blank then click option'
Aworkspace
Bproject
Cregion
Dbucket
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bucket' which is for S3 backend.
Using 'region' which is not valid here.
Using 'project' which is not a Terraform backend attribute.
4fill in blank
hard

Fill both blanks to configure an S3 backend with encryption and versioning enabled.

Terraform
terraform {
  backend "s3" {
    bucket         = "my-terraform-state"
    [1] = true
    [2] = true
  }
}
Drag options to blanks, or click blank then click option'
Aencrypt
Bversioning
Cregion
Dforce_destroy
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'region' or 'force_destroy' with encryption or versioning.
Setting encryption or versioning to false.
5fill in blank
hard

Fill all three blanks to configure a remote backend with organization, workspace, and hostname.

Terraform
terraform {
  backend "remote" {
    [1] = "my-org"
    [2] = "my-workspace"
    [3] = "app.terraform.io"
  }
}
Drag options to blanks, or click blank then click option'
Aorganization
Bworkspace
Chostname
Dregion
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'region' instead of 'hostname'.
Mixing up 'workspace' and 'organization'.