0
0
Terraformcloud~10 mins

Terraform provider ecosystem - 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 Terraform provider for AWS.

Terraform
provider "aws" {
  region = "[1]"
}
Drag options to blanks, or click blank then click option'
Aus-west-2
Baws-region
Cdefault
Dregion-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid region names like 'aws-region' or 'default'.
Leaving the region blank.
2fill in blank
medium

Complete the code to declare the Terraform provider version constraint.

Terraform
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "[1]"
    }
  }
}
Drag options to blanks, or click blank then click option'
A>= 2.0.0
B= latest
C< 1.0
D~> 4.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= latest' which is not a valid version constraint.
Using '< 1.0' which restricts to very old versions.
3fill in blank
hard

Fix the error in the provider block to correctly configure the AWS provider with a profile.

Terraform
provider "aws" {
  profile = [1]
  region  = "us-east-1"
}
Drag options to blanks, or click blank then click option'
A"default"
Bdefault
Cprofile1
D"profile1"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around the profile name.
Using single quotes instead of double quotes.
4fill in blank
hard

Fill both blanks to configure the Terraform provider for Google Cloud with a project and region.

Terraform
provider "google" {
  project = "[1]"
  region  = "[2]"
}
Drag options to blanks, or click blank then click option'
Amy-gcp-project
Bus-central1
Cdefault-project
Deurope-west1
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid project names or regions.
Mixing up project and region values.
5fill in blank
hard

Fill all three blanks to configure the Azure provider with subscription ID, tenant ID, and client ID.

Terraform
provider "azurerm" {
  subscription_id = "[1]"
  tenant_id       = "[2]"
  client_id       = "[3]"
  features        = {}
}
Drag options to blanks, or click blank then click option'
A12345678-1234-1234-1234-123456789abc
B87654321-4321-4321-4321-cba987654321
Cabcdef12-3456-7890-abcd-ef1234567890
Dfedcba98-7654-3210-fedc-ba9876543210
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted IDs.
Mixing up the order of IDs.