Terraform-Associate-003 Dumps

Terraform-Associate-003 Free Practice Test

HashiCorp Terraform-Associate-003: HashiCorp Certified: Terraform Associate (003)

QUESTION 56

When does Terraform create the .terraform.lock.hc1 file?

Correct Answer: C
Terraform creates the .terraform.lock.hcl file after the first terraform init command. This lock file ensures that the dependencies for your project are consistent across different runs by locking the versions of the providers and modules used.

QUESTION 57

Module variable assignments are inherited from the parent module and you do not need to explicitly set them.

Correct Answer: B
Module variable assignments are not inherited from the parent module and you need to explicitly set them using the source argument. This allows you to customize the behavior of each module instance.

QUESTION 58

You can develop a custom provider to manage its resources using Terraform.

Correct Answer: A
You can develop a custom provider to manage its resources using Terraform, as Terraform is an extensible tool that allows you to write your own plugins in Go language. You can also publish your custom provider to the Terraform Registry or use it privately.

QUESTION 59

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?

Correct Answer: D
This is a secure way to inject sensitive variables into your Terraform run, as they will not be stored in any file or source code repository. You can also use environment variables or variable files with encryption to pass sensitive variables to Terraform.

QUESTION 60

Which of these commands makes your code more human readable?

Correct Answer: D
The command that makes your code more human readable is terraform fmt. This command is used to rewrite Terraform configuration files to a canonical format and style, following the Terraform language style conventions and other minor adjustments for
readability. The command is optional, opinionated, and has no customization options, but it is recommended to ensure consistency of style across different Terraform codebases. Consistency can help your team understand the code more quickly and easily, making the use of terraform fmt very important. You can run this command on your configuration files before committing them to source control or as part of your CI/CD pipeline. References =
: Command: fmt : Using Terraform fmt Command to Format Your Terraform Code