Bitzu

Terraform Associate 004 ยท Providers and state fundamentals

What does a Terraform provider do?

Providers as plugins that translate resources into API calls, provider source addresses, registry namespaces, what a provider configuration block holds (2b).

Key points

  • A provider is a plugin that Terraform core talks to.
  • It translates resource and data blocks into API calls for one platform or service (a cloud, SaaS or other system).
  • A provider is identified by a source address of the form [hostname/]namespace/type, where the hostname defaults to registry.terraform.io (the public Terraform Registry).
  • A provider block holds the settings for that plugin, such as region or credentials.

Source: https://developer.hashicorp.com/terraform/language/providers/requirements

Practice questions

Single choice

What is the main job of a provider in Terraform?

  1. It stores the mapping between configuration and real objects
  2. It formats and validates HCL files before planning
  3. It translates resources into API calls for a specific platform
  4. It decides the order in which resources are created
Show answer

Answer: C. It translates resources into API calls for a specific platform

Providers are plugins that turn resource declarations into API calls for a platform. Core handles the graph and state; it does not know any platform's API. Providers do not store state or format code.

Select all that apply

Which items are typically set inside a provider configuration block?

  1. The region the provider should operate in
  2. The version constraint for the provider plugin
  3. Authentication-related arguments such as a profile or token
  4. The list of resources to create
  5. The contents of terraform.tfstate
Show answer

Answer: A. The region the provider should operate in, C. Authentication-related arguments such as a profile or token

A provider block carries settings for the plugin instance: region and credentials-style arguments, and alias for extra configurations. The version constraint lives in required_providers, and resource arguments belong to resource blocks.

True or false

True or false: Terraform core contains built-in knowledge of every cloud's API, so providers are only needed for third-party services.

Show answer

Answer: False

False. Core has no platform-specific API logic at all; every platform, including major clouds, is reached through a provider plugin.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Terraform Associate 004 topics in this module