01. A provider alias is used for what purpose in a Terraform configuration file?
a) alias isn't used with providers, they are used with provisioners
b) to signify what cloud-based region to deploy resources
c) to use as shorthand for resources to be deployed with the referenced provider
d) using the same provider with different configurations for different resources
02. Infrastructure as Code (Iac) provides many benefits to help organizations deploy application infrastructure much faster than clicking around in the console. What are additional benefits to IaC?
(select three)
a) allows infrastructure to be versioned
b) creates a blueprint of your data center
c) code can easily be shared and reused
d) can always be used to deploy the latest features and services
e) eliminates parallelism
03. Consider the following Terraform 0.12 configuration snippet:
variable "vpc_cidrs" {
type = map
default = {
us-east-1 = "10.0.0.0/16"
us-east-2 = "10.1.0.0/16"
us-west-1 = "10.2.0.0/16"
us-west-2 = "10.3.0.0/16"
}
}
resource "aws_vpc" "shared" {
cidr_block = _____________
}
How would you define the cidr_block for us-east-1 in the aws_vpc resource using a variable?
a) var.vpc_cidrs["us-east-1"]
b) var.vpc_cidrs.0
c) vpc_cidrs["us-east-1"]
d) var.vpc_cidrs[0]
04. Published modules via the Terraform Registry provide which of the following benefits?
(select four)
a) support versioning
b) automatically generated documentation
c) allow browsing version histories
d) support from any code repo
e) show examples and READMEs
05. During a terraform apply, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
a) Terraform attempts to provision the resource up to three times before exiting with an error
b) it is automatically deleted
c) the terraform plan is rolled back and all provisioned resources are removed
d) the resource is marked as tainted
06. What happens when you apply Terraform configuration?
Choose TWO correct answers.
a) Terraform makes any infrastructure changes defined in your configuration.
b) Terraform gets the plugins that the configuration requires.
c) Terraform updates the state file with any configuration changes it made.
d) Terraform corrects formatting errors in your configuration.
e) Terraform destroys and recreates all your infrastructure from scratch.
07. Which of the following represents a feature of Terraform Cloud that is NOT free to customers?
a) VCS integration
b) team management and governance
c) private module registry
d) workspace management
08. When running a terraform plan, how can you save the plan so it can be applied at a later time?
a) you cannot save a plan
b) use the -file parameter
c) use the -save parameter
d) use the -out parameter
09. You have defined the values for your variables in the file terraform.tfvars, and saved it in the same directory as your Terraform configuration.
Which of the following commands will use those values when creating an execution plan?
a) terraform plan
b) terraform plan -var-file=terraform.tfvars
c) All of the above
d) None of the above
10. Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments?
Choose TWO correct answers.
a) terraform plan
b) terraform state
c) terraform apply
d) terraform validate
e) terraform output