Free Terraform Associate Exam Braindumps (page: 9)

Page 8 of 113

terraform validate validates the syntax of Terraform files.

  1. True
  2. False

Answer(s): A

Explanation:

The terraform validate command validates the syntax and arguments of the Terraform configuration files. Reference:
https://www.terraform.io/docs/cli/code/index.html


Reference:

https://www.terraform.io/cli/commands/validate



You have 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 will be deleted by Terraform.
Which command should you use to show all of the resources that will be deleted? (Choose two.)

  1. Run terraform plan -destroy.
  2. This is not possible. You can only show resources that will be created.
  3. Run terraform state rm *.
  4. Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.

Answer(s): A,D


Reference:

https://www.terraform.io/docs/cli/commands/state/rm.html



Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?

  1. servers = num_servers
  2. servers = variable.num_servers
  3. servers = var(num_servers)
  4. servers = var.num_servers

Answer(s): D

Explanation:

"Within the module that declared a variable, its value can be accessed from within expressions as var.<NAME>, where <NAME> matches the label given in the declaration block:
Note: Input variables are created by a variable block, but you reference them as attributes on an object named var."


Reference:

https://www.terraform.io/language/values/variables#using-input-variable-values



A Terraform provisioner must be nested inside a resource configuration block.

  1. True
  2. False

Answer(s): A

Explanation:

Most provisioners require access to the remote resource via SSH or WinRM, and expect a nested connection block with details about how to connect.


Reference:

https://www.terraform.io/docs/language/resources/provisioners/connection.html






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

Terraform Associate Discussions & Posts