Black Friday Rush: 75% Off All Exam Bundles! Apply the coupon code below before the offer expires! - Ends in 0d 00h 00m 00s - Coupon code: newyear

HashiCorp Terraform-Associate-004 - HashiCorp Certified: Terraform Associate (004) (HCTA0-004)

Page: 4 / 12
Total 385 questions

Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)

A.

terraform apply

B.

terraform state list

C.

terraform destroy

D.

terraform fmt

Terraform configuration (including any module references) can contain only one Terraform provider type.

A.

True

B.

False

You are responsible for a set of infrastructure that is managed by two workspaces: example-network and example-compute. The example-compute workspace uses data from output values configured in the example-network workspace and must be deployed afterward. Currently, this is a manual process:

An operator deploys changes to the example-network workspace.

They manually copy the output values from the example-network workspace to input variables configured for the example-compute workspace.

They deploy the example-compute workspace.

Which HCP Terraform features can you use to automate this process?

Pick the two correct responses below.

A.

A health check configured on the example-network workspace to create a plan on the example-compute workspace when HCP Terraform applies changes to it.

B.

A health check configured on the example-compute workspace to create a plan when HCP Terraform applies changes to the example-network workspace.

C.

A tfe_outputs data source configured in the example-compute workspace to automatically load output values from the example-network workspace.

D.

A run trigger configured on the example-network workspace to automatically plan changes to the example-compute workspace after every apply.

E.

A run trigger configured on the example-compute workspace to automatically plan changes after HCP Terraform applies changes to the example-network workspace.

How does an HCP Terraform integration using the cloud block differ from remote backends such as S3?

A.

The cloud block supports multiple backends simultaneously.

B.

Using the cloud block automatically encrypts state files at rest and in transit.

C.

Using the cloud block enables remote operations on infrastructure managed by HCP Terraform or Terraform Enterprise.

D.

Using the cloud block requires Terraform Enterprise.

Which of these workflows is only enabled by the use of Infrastructure as Code?

A.

Automatic scaling of resources based on application load.

B.

Role-based access control of cloud resources.

C.

Cost optimization of infrastructure deployment.

D.

Reviewing the proposed changes for potential security issues.

You have successfully deployed an application that includes a resource with a public IP address. Due to a configuration oversight, no outputs were defined.

Using the Terraform CLI, how can you find the IP address of the deployed resource with minimum disruption to the application?

A.

In a new folder, use the terraform_remote_state data source to load the state file, and then write an output for every resource found in the state file.

B.

Run terraform output ip_address to view the result.

C.

Run terraform state list to find the resource name, and then run terraform state show to inspect its attributes, including the public IP address.

D.

Run terraform destroy, then terraform apply, and look for the IP address in standard output.

You can configure Terraform to log to a file using the TF_LOG environment variable.

A.

True

B.

False

Exhibit:

resource " kubernetes_namespace " " example " {

name = " test "

}

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

A.

kubernetes_namespace.example,name

B.

kubernetes_namespace.test.name

C.

data.kubernetes_namespace.name

D.

resource.kubernetes_namespace.example.name

Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.

How should they ensure the code satisfies conventions?

A.

Terraform automatically formats configuration on terraform apply

B.

Run terraform validate prior to executing terraform plan or terraform apply

C.

Use terraform fmt

D.

Replace all tabs with spaces

When using multiple configurations of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

A.

depends_on

B.

alias

C.

name

D.

id