0
0
Terraformcloud~10 mins

Terragrunt for DRY configurations 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 Terragrunt configuration file format.

Terraform
terraform {
  source = "./modules/[1]"
}
Drag options to blanks, or click blank then click option'
Anetwork
Bcompute
Cstorage
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated module names that don't exist in the project.
2fill in blank
medium

Complete the code to include a remote state backend configuration in Terragrunt.

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

Fix the error in the Terragrunt configuration to correctly include a dependency block.

Terraform
dependency "vpc" {
  config_path = "../[1]"
}
Drag options to blanks, or click blank then click option'
Acompute
Bnetwork
Cstorage
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong module name that does not exist in the path.
4fill in blank
hard

Fill both blanks to configure inputs and locals in Terragrunt.

Terraform
inputs = {
  environment = "[1]"
  region      = "[2]"
}
Drag options to blanks, or click blank then click option'
Aprod
Bdev
Cus-east-1
Deu-west-1
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing production environment with a development region.
5fill in blank
hard

Fill all three blanks to define a Terragrunt configuration with remote state, inputs, and dependency.

Terraform
remote_state {
  backend = "[1]"
  config = {
    bucket = "terraform-state-bucket"
  }
}

inputs = {
  app_name = "[2]"
}

dependency "db" {
  config_path = "../[3]"
}
Drag options to blanks, or click blank then click option'
As3
Bmyapp
Cdatabase
Dlocal
Attempts:
3 left
💡 Hint
Common Mistakes
Using a local backend with an S3 bucket name.
Incorrect dependency path.