- (Exam Topic 4)
Which of the following is not valid source path for specifying a module?
Correct Answer:
A
- (Exam Topic 4)
You need to migrate a workspace to use a remote backend. After updating your configuration, what command do you run to perform the migration?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
Solution:
Once you have authenticated to Terraform Cloud, you're ready to migrate your local state file to Terraform Cloud. To begin the migration, reinitialize. This causes Terraform to recognize your cloud block configuration.
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 1)
In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud Workspaces, conceptually you could think about them as completely separate working directories.
Correct Answer:
A
https://www.terraform.io/cloud-docs/workspaces
"When run locally, Terraform manages each collection of infrastructure with a persistent working directory, which contains a configuration, state data, and variables. Since Terraform CLI uses content from the directory it runs in, you can organize infrastructure resources into meaningful groups by keeping their configurations in separate directories.
- (Exam Topic 2)
You want to use different AMI images for different regions and for the purpose you have defined following code block.
* 1.variable "images"
* 2.{
* 3. type = "map"
* 4.
* 5. default = {
* 6. us-east-1 = "image-1234"
* 7. us-west-2 = "image-4567"
* 8. us-west-1 = "image-4589"
* 9. }
* 10.}
What of the following approaches needs to be followed in order to select image-4589?
Correct Answer:
A
- (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.