HashiCorp Certified: Terraform Associate

Here you have the best Hashicorp Terraform Associate practice exam questions

  • You have 327 total questions to study from
  • Each page has 5 questions, making a total of 66 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 14, 2024
Question 1 of 327

The terraform.tfstate file always matches your currently built infrastructure.

    Correct Answer: B

    B

    Reference:

    https://www.terraform.io/docs/language/state/index.html

Question 2 of 327

One remote backend configuration always maps to a single remote workspace.

    Correct Answer: B

    A

    Reference:

    https://www.terraform.io/docs/language/settings/backends/remote.html

Question 3 of 327

How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?

    Correct Answer: A

    The Terraform remote backend is unique because it can execute Terraform runs on dedicated infrastructure either on premises or in Terraform Cloud. This feature distinguishes it from other state backends like S3 or Consul, which only store state snapshots but don't have the capability to execute Terraform runs.

Question 4 of 327

What is the workflow for deploying new infrastructure with Terraform?

    Correct Answer: D

    To deploy new infrastructure with Terraform, the standard workflow involves writing a Terraform configuration to define the desired infrastructure. Then, run terraform init to initialize the working directory, which downloads necessary providers and modules. After initialization, terraform plan is executed to create an execution plan, showing what changes will be made to match the configuration. Finally, terraform apply is used to apply the desired changes, thus creating the new infrastructure.

Question 5 of 327

A provider configuration block is required in every Terraform configuration.

Example:

    Correct Answer: B

    A provider configuration block is not required in every Terraform configuration. If the resources in the configuration only use a single provider's resources and do not require any specific configuration for that provider, Terraform can infer the provider and use the default settings. This means that the provider block can be omitted and Terraform will automatically download and use the necessary provider based on the resource types used.