00:00

QUESTION 86

- (Exam Topic 4)
True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with that particular workspace.

Correct Answer: B
The persistent data stored in the backend belongs to a workspace. Initially, the backend has only one workspace, called "default", and thus there is only one Terraform state associated with that configuration.

QUESTION 87

- (Exam Topic 4)
Consider the following Terraform 0.12 configuration snippet:
* 1. variable "vpc_cidrs" {
* 2. type = map
* 3. default = {
* 4. us-east-1 = "10.0.0.0/16"
* 5. us-east-2 = "10.1.0.0/16"
* 6. us-west-1 = "10.2.0.0/16"
* 7. us-west-2 = "10.3.0.0/16"
* 8. }
* 9. }
* 10.
* 11. resource "aws_vpc" "shared" {
* 12. cidr_block = ______
* 13. }
How would you define the cidr_block for us-east-1 in the aws_vpc resource using a variable?

Correct Answer: C

QUESTION 88

- (Exam Topic 4)
You have written a terraform IaC script which was working till yesterday , but is giving some vague error from today , which you are unable to understand . You want more detailed logs that could potentially help you troubleshoot the issue , and understand the root cause. What can you do to enable this setting? Please note , you are using terraform OSS.

Correct Answer: D
Terraform has detailed logs which can be enabled by setting the TF_LOG environment variable to any value. This will cause detailed logs to appear on stderr.
You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN or ERROR to change the verbosity of the logs. TRACE is the most verbose and it is the default if TF_LOG is set to something other than a log level name.
To persist logged output you can set TF_LOG_PATH in order to force the log to always be appended to a specific file when logging is enabled. Note that even when TF_LOG_PATH is set, TF_LOG must be set in order for any logging to be enabled.

QUESTION 89

- (Exam Topic 4)
Which are examples of infrastructure as code? (Choose two.)

Correct Answer: CD

QUESTION 90

- (Exam Topic 3)
You cannot publish your own modules on the Terraform Registry.

Correct Answer: A
https://www.terraform.io/docs/registry/modules/publish.html
You have a Terraform configuration file where a variable itemNum is defined as follows: variable "itemNum" { default = 3}