Free Terraform Associate Exam Braindumps (page: 4)

Page 3 of 113

What command does Terraform require the first time you run it within a configuration directory?

  1. terraform import
  2. terraform init
  3. terraform plan
  4. terraform workspace

Answer(s): B

Explanation:

terraform init command is used to initialize a working directory containing Terraform configuration files. Reference:
https://www.terraform.io/docs/cli/commands/init.html



You have deployed a new webapp with a public IP address on a clod provider. However, you did not create any outputs for your code.
What is the best method to quickly find the IP address of the resource you deployed?

  1. Run terraform output ip_address to view the result
  2. In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file
  3. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
  4. Run terraform destroy then terraform apply and look for the IP address in stdout

Answer(s): C


Reference:

https://www.terraform.io/cli/commands/state/show



Which of the following is not a key principle of infrastructure as code?

  1. Versioned infrastructure
  2. Golden images
  3. Idempotence
  4. Self-describing infrastructure

Answer(s): B


Reference:

https://docs.microsoft.com/en-us/azure/devops/learn/what-is-infrastructure-as-code#:~:text=Idempotence%20is%20a%20principle%20of,of%20the%20environment's%20starting%20state.



Terraform variables and outputs that set the "description" argument will store that description in the state file.

  1. True
  2. False

Answer(s): B


Reference:

https://www.terraform.io/docs/language/values/outputs.html






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

Terraform Associate Discussions & Posts