HashiCorp Certified: Terraform Associate (003) Questions and Answers
Terraform providers are always installed from the Internet.
Which provider authentication method prevents credentials from being stored in the state file?
Which parameters does terraform import require? Choose two correct answers.
When do changes invoked by terraform apply take effect?
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
If a module declares a variable with a default, that variable must also be defined within the module.
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
You can develop a custom provider to manage its resources using Terraform.
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?
You have used Terraform lo create an ephemeral development environment in the (loud 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 of the resources that mil be deleted? Choose two correct answers.
Where in your Terraform configuration do you specify a state backend?
You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Terraform configuration can only import modules from the public registry.
You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? Choose two correct answers.
Which of the following is not true of Terraform providers?
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
Which of the following is not a valid siring function in Terraform?
You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
How does Terraform determine dependencies between resources?
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?
Which of these is true about Terraform's plugin-based architecture?
Before you can use a remote backend, you must first execute terra-form init.
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
Which configuration consistency errors does terraform validate report?
You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:
When you run terraform validate, you get the following error:
What must you do to successfully retrieve this value from your networking module?
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
Which command lets you experiment with terraform expressions?
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?
Which of the following arguments are required when declaring a Terraform output?
You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?
Why would you use the -replace flag for terraform apply?
When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?
Which command must you first run before performing further Terraform operations in a working directory?
You can reference a resource created with for_each using a Splat ( *) expression.
A provider configuration block is required in every Terraform configuration.
Example:
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A)
B)
C)
D)
You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?
A)
B)
C)
D)
Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.
Only the user that generated a plan may apply it.
Which of the following statements about Terraform modules is not true?
Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?