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?
data.kubernetes_namespace.name
kubernetes_namespace.example.name
kubernetes_namespace.test.name
resource.kubernetes_namespace.example.name
Question 7
Which argument(s) are required when declaring a Terraform variable?
type
default
description
All of the above
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
Run terraform login to reauthenticate with the provider.
Review /var/log/terraform.log for error messages.
Review syslog for Terraform error messages.
Set TF_LOG=DEBUG.
Question 9
Which Terraform command checks that your configuration syntax is correct?
terraform show
terraform init
terraform fmt
terraform validate
Question 10
How does the HCP Terraform/Terraform Cloud integration differ from backends such as S3, Consul, etc.?
It can execute Terraform runs on dedicated infrastructure in HCP Terraform/Terraform Cloud.
It doesn’t show the output of a terraform apply locally.