- (Exam Topic 4)
Which of the following value will be accepted for my_var?
* 1. variable "my_var"
* 2. {
* 3. type = string
* 4. }
Correct Answer:C
The Terraform language will automatically convert number and bool values to string values when needed, and vice-versa as long as the string contains a valid representation of a number or boolean value. Example
* true converts to "true", and vice-versa
* false converts to "false", and vice-versa
* 15 converts to "15", and vice-versa
Where possible, Terraform automatically converts values from one type to another in order to produce the expected type. If this isn't possible, Terraform will produce a type mismatch error and you must update the
configuration with a more suitable expression. https://www.terraform.io/docs/configuration/expressions.html#type-conversion
- (Exam Topic 4)
colleagues is new toTerraform and wants to add a new workspace named new-hire. What command he should execute from the following?
Correct Answer:B
- (Exam Topic 2)
Which of the following command can be used to view the specified version constraints for all providers used in the current configuration.
Correct Answer:A
Use the terraform providers command to view the specified version constraints for all providers used in the current configuration.
https://www.terraform.io/docs/configuration/providers.html
- (Exam Topic 2)
You want to get involved in the development of Terraform. As this is an open source project, you would like to contribute a fix for an open issue of Terraform. What programming language will need to use to write the fix?
Correct Answer:C
Basic programming knowledge. Terraform and Terraform Plugins are written in the Go programming language, but even if you've never written a line of Go before, you're still welcome to take a dive into the code and submit patches. The community is happy to assist with code reviews and offer guidance specific to Go.
- (Exam Topic 4)
As a member of an operations team that uses infrastructure as code (laC) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?
Correct Answer:C
- (Exam Topic 4)
Terraform variable names are saved in the state file.
Correct Answer:B
Terraform stores information about your infrastructure in a state file. This state file keeps track of resources created by your configuration and maps them to real-world resources. https://learn.hashicorp.com/tutorials/terraform/state-cli