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
Cloud infrastructure and State file
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.
Use the Terraform taint command targeting the VMs then run Terraform plan and Terraform apply
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
depends_on
depends_on
depends_on
terraform validate reports HCL syntax errors.
A
Which of the following is not a way to trigger terraform destroy ?
A
D is correct
Passing ---destroy at the end of apian request
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
B. False,
You can delete you infrastructure from the terraform file and run terraform apply
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
The two correct answers are:
B. The Terraform code is copied to the target resources to be applied locally and could expose secrets if a target resource is compromised.
C. Terraform code is typically stored in version control, as well as copied to the systems from which it's run. Any of those may not have robust security mechanisms.
Terraform configuration (including any module references) can contain only one Terraform provider
type.
B
B. The ability to reuse best practice configurations and settings
The ability to reuse best practice configurations and settings