HashiCorp Terraform Associate 003 Practice Test - Questions Answers, Page 19
List of questions
Related questions
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
Automatic backups of configuration and state.
Remote state storage.
Automated infrastructure deployment visualization.
A web-based user interface (UI).
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
terraform apply
terraform state list
terraform destroy
terraform fmt
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
They can securely store cloud credentials.
They have role-based access controls.
Plans and applies can be triggered via version control system integrations.
You must use the CLI to switch between workspaces.
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
You can enforce a list of approved AWS AMIs.
Sentinel Policies can be written in HashiCorp Configuration Language (HCL).
You can check out and check in cloud access keys.
Policy-as-code can enforce security best practices.
You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.
Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)
Run terraform destroy. This will output all the resources that will be deleted before prompting for approval.
Run terraform show -destroy.
Run terraform state rm *.
Terraform configuration can only call modules from the public registry.
True
False
You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses)
In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.
In HashiCorp Vault.
In a terraform.tfvars file, securely managed and shared with your team.
In a terraform.tfvars file, checked into your version control system.
In a plaintext document on a shared drive.
When do you need to explicitly execute Terraform in refresh-only mode?
Before every terraform plan.
Before every terraform apply.
Before every terraform import.
None of the above.
In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
True
False
Which command(s) adds existing resources in a public cloud into Terraform state?
terraform init
terraform plan
terraform refresh
terraform import
All of these
Question