111. How would you refer to the indexing instance from the configuration below?
resource "aws_instance" "web" {
...
for_each = {
"terraform": "value1",
"resource": "value2",
"indexing": "value3",
"example": "value4",
}
}
A. aws_instance[“web”][“indexing”]
B. aws_instance.web.indexing
C. aws_instance-web[“indexing”]
D. aws_instance.web[“indexing”]
Answer
D
112. Which feature is not included in Terraform Cloud’s free tier?
A. Workspace
B. Remote state management
C. Audit logging
D. Private module registry
Answer
C
113. When should you run terraform init?
A. After you run terraform apply for the first time in a new Terraform project and before you run terraform plan
B. After you run terraform plan for the first time in a new Terraform project and before you run terraform apply
C. After you start coding a new Terraform project and before you run terraform plan for the first time
D. Before you start coding a new Terraform project
Answer
C
114. Terraform configuration (including any module references) can contain only one Terraform provider type.
A. True
B. False
Answer
B
115. You are making changes to the existing Terraform code to add some new infrastructure.
When is the best time to run terraform validate?
A. After you run terraform plan so you can validate that your state file is consistent with your infrastructure
B. Before you run terraform plan so you can validate your code syntax
C. Before you run terraform apply so you can validate your infrastructure changes
D. After you run terraform apply so you can validate that your infrastructure is reflected in your code
Answer
B
116. How does Terraform manage most dependencies between resources?
A. By defining dependencies as modules and including them in a particular order
B. The order that resources appear in Terraform configuration indicates dependencies
C. Using the depends_on parameter
D. Terraform will automatically manage most resource dependencies
Answer
D
117. What are some benefits of using Sentinel with Terraform Cloud/Terraform Enterprise? (Choose three.)
A. Policy-as-code can enforce security best practices
B. You can restrict specific configurations on resources like “CIDR=0.0.0.0/0” not allowed
C. You can enforce a list of approved AWS AMIs
D. Sentinel Policies can be written in HashiCorp Configuration Language (HCL)
E. You can check out and check in cloud access keys
Answer
A, B, C
118. You want to share Terraform state with your team, store it securely, and provide state locking.
How would you do this? (Choose three.)
A. Using the remote Terraform backend with Terraform Cloud / Terraform Enterprise.
B. Using the local backend.
C. Using the s3 terraform backend. The dynamodb_field option is not needed.
D. Using an s3 terraform backend with an appropriate IAM policy and dynamodb_field option configured.
E. Using the consul Terraform backend.
Answer
A, D, E
119. From which of these sources can Terraform import modules?
A. Local path
B. GitHub Repository
C. Terraform Module Registry
D. All of the above
Answer
D
120. How would you output returned values from a child module?
A. Declare the output in the root configuration
B. Declare the output in the child module
C. Declare the output in both the root and child module
D. None of the above
Answer
C