- (Exam Topic 4)
In the below configuration, how would you reference the module output vpc_id?
Type your answer in the field provided. The text field is not case sensitive and all variations of the correct answer are accepted.
Solution:
https://cloudcasts.io/course/terraform/community-vpc-module
Does this meet the goal?
Correct Answer:A
- (Exam Topic 2)
You are using a terraform operation that writes state. Unfortunately automatic state unlocking has failed for that operation. Which of the below commands can be used to remove the already acquired lock on the state?
Correct Answer:B
Command: force-unlock
Manually unlock the state for the defined configuration.
This will not modify your infrastructure. This command removes the lock on the state for the current configuration. The behavior of this lock is dependent on the backend being used. Local state files cannot be unlocked by another process.
https://www.terraform.io/docs/commands/force-unlock.html https://www.terraform.io/docs/state/locking.html
Terraform has a force-unlock command to manually unlock the state if unlocking failed.
If you unlock the state when someone else is holding the lock it could cause multiple writers. Force unlock should only be used to unlock your own lock in the situation where automatic unlocking failed.
- (Exam Topic 1)
All standard backend types support state storage, locking, and remote operations like plan. apply and destroy.
Correct Answer:B
https://www.terraform.io/language/settings/backends/configuration
"Some of these backends act like plain remote disks for state files, while others support locking the state while operations are being performed. This helps prevent conflicts and inconsistencies. The built-in backends listed are the only backends. You cannot load additional backends as plugins."
- (Exam Topic 4)
When you use a remote backend that needs authentication. HashrCorp recommends that you:
Correct Answer:C
We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file. Reference: https://www.terraform.io/language/settings/backends/remote
- (Exam Topic 4)
Which are examples of infrastructure as code? (Choose two.)
Correct Answer:CD