- (Exam Topic 4)
Which statements best describes what the local variable assignment is doing in the following code snippet:
Correct Answer:
D
- (Exam Topic 4)
Which argument(s) are required when declaring a Terraform variable?
Correct Answer:
E
Terraform CLI defines the following OPTIONAL arguments for variable declarations: default - A default value which then makes the variable optional.
type - This argument specifies what value types are accepted for the variable. description - This specifies the input variable's documentation.
validation - A block to define validation rules, usually in addition to type constraints. sensitive - Limits Terraform UI output when the variable is used in configuration. nullable - Specify if the variable can be null within the module. https://www.terraform.io/language/values/variables#arguments
- (Exam Topic 3)
Dawn has created the below child module. Without changing the module, can she override the instance_type from t2.micro to t2.large form her code while calling this module?
* 1. resource "aws_instance" "myec2"
* 2. {
* 3. ami = "ami-082b5a644766e0e6f"
* 4. instance_type = "t2.micro
* 5. }
Correct Answer:
B
As the instance_type is hard-coded in source module, you will not be able to change its value from destination module. Instead of hard-coding you should use variable with default values.
- (Exam Topic 2)
Which of the following represents a feature of Terraform Cloud that is NOT free to customers?
Correct Answer:
A
Role Based Access Controls (RBAC) for controlling permissions for who has access to what configurations within an organization and it is not free to customers.
https://www.hashicorp.com/products/terraform/pricing/
- (Exam Topic 1)
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (files). You need to enable debug messages to find this out.
Which of the following would achieve this?
Correct Answer:
A
Although this will only output to stderr and if you need to review log file you will need to include TF_LOG_PATH=pathtofile https://www.terraform.io/internals/debugging