What advantage does an operations team that uses infrastructure as code have?
B
Explanation:
As a developer, you want to ensure your plugins are up to date with the latest versions. Which
Terraform command should you use?
D
Choose the answer that correctly completes the sentence: _______backends support state locking.
D
Remote backends supports state locking.
Which of the following does terraform apply change after you approve the execution plan? Choose
two correct answers.
C, D
Module version is required to reference a module on the Terraform Module Registry.
B
Specifying a module version is optional when referencing a module from the Terraform Module Registry.
By default, if you do not specify a version, Terraform will download the latest available version of the module.
What kind of configuration block will create an infrastructure object with settings specified in the
block?
C
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual
machine instance with an identical one without affecting the database. What is the best way to
achieve this using Terraform?
A
B. Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply. ❌
This would remove the VM entirely, rather than replacing it.
C. Use the terraform apply command targeting the VM resources only. ❌
Running terraform apply without marking the resource for recreation will not replace the existing VM.
D. Use the terraform state rm command to remove the VM from the state file. ❌
This removes Terraform’s knowledge of the VM but does not actually recreate it.
Terraform would treat it as unmanaged unless redefined in the code, potentially leading to orphaned resources.
You need to specify a dependency manually. What resource meta-parameter can you use lo make
sure Terraform respects thee dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the
correct answer are accepted.
depends_on
terraform validate reports HCL syntax errors.
A
Which of the following is not a way to trigger terraform destroy ?
A
Using the terraform state rm command against a resource will destroy it.
B
terraform destroy is the only way to remove infrastructure.
A. True
B. False
B
A Terraform output that sets the ''sensitive'' argument to true will not store that value in the state
file.
B
Setting the sensitive = true argument for a Terraform output does not prevent the value from being stored in the state file.
Instead, it only affects how the value is displayed. Specifically, it prevents the value from being shown in the Terraform output when you run terraform output. The value will still be stored in the state file, but it will be masked when you run commands that display outputs to the console.
Why should secrets not be hard coded into Terraform code? Choose two correct answers
C, D
Terraform configuration (including any module references) can contain only one Terraform provider
type.
B
B. The ability to reuse best practice configurations and settings