Courseiva
Understand Terraform basicseasyMultiple SelectObjective-mapped

TF-004 Understand Terraform basics Practice Question

Which two of the following are correct statements about Terraform providers?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Providers are plugins that Terraform uses to manage resources.

Terraform providers are plugins that enable Terraform to manage resources for a specific cloud or service (e.g., AWS, Azure). They can be sourced from the Terraform Registry or other locations. The correct statements are B and C. A is incorrect because a provider is not required in every configuration; some configurations may use only data sources or child modules that already have providers defined. D is incorrect because multiple providers can be used in a single configuration to manage resources across different platforms. E is incorrect because providers are installed by `terraform init`, not `terraform plan`.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A provider must be defined in every Terraform configuration.

    Why it's wrong here

    This statement is incorrect. A `provider` block is not universally mandatory in every Terraform configuration. It is only required if the configuration explicitly declares resources or data sources that belong to that specific provider. A configuration might exist solely to manage local files using the `local` provider, or even contain no resources at all (e.g., a module definition without direct resource declarations), thus not requiring a provider block.

  • Providers are plugins that Terraform uses to manage resources.

    Why this is correct

    This statement is correct. Providers function as specialized plugins that extend Terraform's core capabilities, enabling it to interact with various cloud platforms, SaaS offerings, and on-premise infrastructure. Each provider implements a set of resource types and data sources, defining the API calls and logic necessary to create, read, update, and delete those specific infrastructure components.

  • Providers can be sourced from the Terraform Registry.

    Why this is correct

    This statement is correct. The Terraform Registry serves as the primary and official repository for discovering and sourcing a vast array of Terraform providers, both official and community-contributed. When a `terraform init` command is executed, Terraform automatically downloads the specified providers from this registry, ensuring access to the necessary plugins for managing infrastructure.

  • Only one provider can be used per configuration.

    Why it's wrong here

    This statement is incorrect. Terraform configurations are designed to be highly flexible and can seamlessly integrate multiple providers within a single codebase. For instance, a complex infrastructure setup might simultaneously provision resources in Amazon Web Services (AWS) using the AWS provider and manage DNS records in Google Cloud DNS using the GCP provider, all within the same root module or child modules.

  • Providers are automatically installed by terraform plan.

    Why it's wrong here

    This statement is incorrect. Provider installation is a distinct phase handled exclusively by the `terraform init` command. This command initializes the working directory, downloading and configuring the necessary provider plugins based on the configuration's requirements. The `terraform plan` command, conversely, is responsible for generating an execution plan by comparing the desired state with the current state, and it assumes providers are already installed.

About these practice questions

Courseiva writes every TF-004 question from scratch — 428 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.