Free Terraform Associate Exam Braindumps (page: 36)

Page 35 of 113

Which of the following command can be used to view the specified version constraints for all providers used in the current configuration.

  1. terraform providers
  2. terraform state show
  3. terraform provider
  4. terraform plan

Answer(s): A

Explanation:

Use the terraform providers command to view the specified version constraints for all providers used in the current configuration.


Reference:

https://www.terraform.io/docs/configuration/providers.html



Which of the following represents a feature of Terraform Cloud that is NOT free to customers?

  1. Roles and Team Management
  2. WorkSpace Management
  3. Private Module Registry
  4. VCS Integration

Answer(s): A

Explanation:

Role Based Access Controls (RBAC) for controlling permissions for who has access to what configurations within an organization and it is not free to customers.


Reference:

https://www.hashicorp.com/products/terraform/pricing/



What is the purpose of using the local-exec provisioner? (Select Two)

  1. To invoke a local executable.
  2. Executes a command on the resource to invoke an update to the Terraform state.
  3. To execute one or more commands on the machine running Terraform.
  4. Ensures that the resource is only executed in the local infrastructure where Terraform is deployed.

Answer(s): A,C

Explanation:

The local-exec provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource.
Note that even though the resource will be fully created when the provisioner is run, there is no guarantee that it will be in an operable state - for example system services such as sshd may not be started yet on compute resources.
Example usage
resource "aws_instance" "web" { # ...
provisioner "local-exec" {
command = "echo ${aws_instance.web.private_ip} >> private_ips.txt"
}
}
Note: Provisioners should only be used as a last resort. For most common situations there are better alternatives.


Reference:

https://www.terraform.io/docs/provisioners/local-exec.html



terraform state subcommands such as list are read-only commands, do read-only commands create state backup files?

  1. Yes
  2. No

Answer(s): B

Explanation:

Subcommands that are read-only (such as list) do not write any backup files since they aren't modifying the state.
All terraform state subcommands that modify the state write backup files. The path of these backup file can be controlled with -backup.


Reference:

https://www.terraform.io/docs/commands/state/index.html#backups






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

Terraform Associate Discussions & Posts