Free Terraform-Associate-003 Exam Braindumps

Pass your HashiCorp Certified: Terraform Associate (003) exam with these free Questions and Answers

Page 6 of 36
QUESTION 21

The Terraform binary version and provider versions must match each other in a single configuration.

  1. A. True
  2. B. False

Correct Answer: B
The Terraform binary version and provider versions do not have to match each other in a single configuration. Terraform allows you to specify provider version constraints in the configuration??s terraform block, which can be different from the Terraform binary version1. Terraform will use the newest version of the provider that meets the configuration??s version constraints2. You can also use the dependency lock file to ensure Terraform is using the correct provider version3. References =
•1: Providers - Configuration Language | Terraform | HashiCorp Developer
•2: Multiple provider versions with Terraform - Stack Overflow
•3: Lock and upgrade provider versions | Terraform - HashiCorp Developer

QUESTION 22

How does Terraform manage most dependencies between resources?

  1. A. Terraform will automatically manage most resource dependencies
  2. B. Using the depends_on parameter
  3. C. By defining dependencies as modules and including them in a particular order
  4. D. The order that resources appear in Terraform configuration indicates dependencies

Correct Answer: A
This is how Terraform manages most dependencies between resources, by using the references between them in the configuration files. For example, if resource A depends on resource B, Terraform will create resource B first and then pass its attributes to resource A.

QUESTION 23

Which Terraform command checks that your configuration syntax is correct?

  1. A. terraform validate
  2. B. terraform init
  3. C. terraform show
  4. D. terraform fmt

Correct Answer: A
The terraform validate command is used to check that your Terraform configuration files are syntactically valid and internally consistent. It is a useful command for ensuring your Terraform code is error-free before applying any changes to your infrastructure.

QUESTION 24

You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.
Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

  1. A. Terraform will prompt you to pick which resource you want to destroy
  2. B. Terraform will destroy the application server because it is listed first in the code
  3. C. Terraform will prompt you to confirm that you want to destroy all the infrastructure
  4. D. Terraform will destroy the main, tf file
  5. E. Terraform will immediately destroy all the infrastructure

Correct Answer: C
This is what will happen if you run terraform destroy without any flags, as it will attempt to delete all the resources that are associated with your current working directory or workspace. You can use the -target flag to specify a particular resource that you want to destroy.

QUESTION 25

Which of these statements about Terraform Cloud workspaces is false?

  1. A. They have role-based access controls
  2. B. You must use the CLI to switch between workspaces
  3. C. Plans and applies can be triggered via version control system integrations
  4. D. They can securely store cloud credentials

Correct Answer: B
The statement that you must use the CLI to switch between workspaces is false. Terraform Cloud workspaces are different from Terraform CLI workspaces. Terraform Cloud workspaces are required and represent all of the collections of infrastructure in an organization. They are also a major component of role-based access in Terraform Cloud. You can grant individual users and user groups permissions for one or more workspaces that dictate whether they can manage variables, perform runs, etc. You can create, view, and switch between Terraform Cloud workspaces using the Terraform Cloud UI, the Workspaces API, or the Terraform Enterprise Provider5. Terraform CLI workspaces are optional and allow you to create multiple distinct instances of a single configuration within one working directory. They are useful for creating disposable environments for testing or experimenting without affecting your main or production environment. You can create, view, and switch between Terraform CLI workspaces using the terraform workspace command6. The other statements about Terraform Cloud workspaces are true. They have role-based access controls that allow you to assign permissions to users and teams based on their roles and responsibilities. You can create and manage roles using the Teams API or the Terraform Enterprise Provider7. Plans and applies can be triggered via version control system integrations that allow you to link your Terraform Cloud workspaces to your VCS repositories. You can configure VCS settings, webhooks, and branch tracking to automate your Terraform Cloud workflow8. They can securely store cloud credentials as sensitive variables that are encrypted at rest and only decrypted when needed. You can manage variables using the Terraform Cloud UI, the Variables API, or the Terraform Enterprise Provider9. References = [Workspaces]5, [Terraform CLI Workspaces]6, [Teams and Organizations]7, [VCS Integration]8, [Variables]9

Page 6 of 36

Post your Comments and Discuss HashiCorp Terraform-Associate-003 exam with other Community members: