0
0
Terraformcloud~10 mins

Provider configuration block 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 cloud provider as AWS.

Terraform
provider "[1]" {}
Drag options to blanks, or click blank then click option'
Agoogle
Bdigitalocean
Cazure
Daws
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong provider name like 'google' when intending AWS.
Misspelling the provider name.
2fill in blank
medium

Complete the code to set the AWS region to us-west-2.

Terraform
provider "aws" {
  region = "[1]"
}
Drag options to blanks, or click blank then click option'
Aus-east-1
Beu-central-1
Cus-west-2
Dap-southeast-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a region code that does not exist.
Forgetting to put the region value in quotes.
3fill in blank
hard

Fix the error in the provider block by completing the missing attribute name.

Terraform
provider "aws" {
  [1] = "us-east-1"
}
Drag options to blanks, or click blank then click option'
Azone
Bregion
Clocation
Darea
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'zone' or 'location' instead of 'region'.
Misspelling the attribute name.
4fill in blank
hard

Fill both blanks to configure the AWS provider with region us-east-1 and profile default.

Terraform
provider "aws" {
  [1] = "us-east-1"
  [2] = "default"
}
Drag options to blanks, or click blank then click option'
Aregion
Bprofile
Czone
Daccount
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'zone' or 'account' instead of 'region' or 'profile'.
Swapping the order of attributes.
5fill in blank
hard

Fill all three blanks to configure the AWS provider with region us-west-1, profile admin, and enable shared credentials file.

Terraform
provider "aws" {
  [1] = "us-west-1"
  [2] = "admin"
  [3] = true
}
Drag options to blanks, or click blank then click option'
Aregion
Bprofile
Cshared_credentials_file
Duse_shared_credentials_file
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'shared_credentials_file' as a boolean instead of a file path.
Confusing attribute names for enabling shared credentials.