Review 133 TERRAFORM-ASSOCIATE-003 practice questions with answer explanations and community insights.
Question 1
As a developer, you want to ensure your plugins are up-to-date with the latest versions. Which Terraform command should you use?
terraform refresh -upgrade
terraform apply -upgrade
terraform providers -upgrade
terraform init -upgrade
Question 2
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Delete the state file every time you run Terraform.
Store the state in an encrypted backend.
Always store your secrets in a secrets.tfvars file.
Edit your state file to scrub out the sensitive data.
Question 3
You can reference a resource created with for_each using a splat ( * ) expression.
True
False
Question 4
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working directory contains a .terraform.lock.hcl file. How will Terraform choose which version of the provider to use?
Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources.
Terraform will use the version recorded in your lock file.
Terraform will check your state file to determine the provider version to use.
Terraform will use the latest version of the provider available at the time you provision your new resource.
Question 5
All standard backend types support state storage, locking, and remote operations like plan, apply, and destroy.
True
False
We are moving to a new platform
CertificationTest is being migrated. Some pages may be slow or briefly unavailable; everything will be back to normal within a few hours. If you run into any issue, email support@certificationtest.net.