Terraform Associate 003

Terraform Associate 003 practice questions, page 2 of 6, with answer review and explanations.

Question 6

A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?

  1. data.kubernetes_namespace.name
  2. kubernetes_namespace.example.name
  3. kubernetes_namespace.test.name
  4. resource.kubernetes_namespace.example.name

Question 7

Which argument(s) are required when declaring a Terraform variable?

  1. type
  2. default
  3. description
  4. All of the above
  5. None of the above

Question 8

terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem? Error loading state: AccessDenied: Access Denied status code: 403, request id: 288766CE5CCA24A0, host id: web.example.com

  1. Run terraform login to reauthenticate with the provider.
  2. Review /var/log/terraform.log for error messages.
  3. Review syslog for Terraform error messages.
  4. Set TF_LOG=DEBUG.

Question 9

Which Terraform command checks that your configuration syntax is correct?

  1. terraform show
  2. terraform init
  3. terraform fmt
  4. terraform validate

Question 10

How does the HCP Terraform/Terraform Cloud integration differ from backends such as S3, Consul, etc.?

  1. It can execute Terraform runs on dedicated infrastructure in HCP Terraform/Terraform Cloud.
  2. It doesn’t show the output of a terraform apply locally.
  3. It is only available to paying customers.
  4. All of the above.