required_providers

The block inside the terraform block that lists each provider a configuration needs, where to download it from and which versions are acceptable.

In more detail

Each entry has a local name on the left, and a source address and version constraint inside. Declaring a provider here only says which plugin is needed; configuring it, with a region or credentials, is done in a separate provider block. terraform init reads this block to decide what to download.

Example

required_providers {
  local = {
    source  = "hashicorp/local"
    version = "~> 2.5"
  }
}

Related terms

Taught in

References

Certification courses