provider block

A top-level block that configures a provider, for example which region or endpoint it talks to and which credentials it uses.

In more detail

It is separate from required_providers, which only says which plugin and versions you need. Some providers, like local and random, need no provider block at all. Never put credentials in the block itself; let the provider read them from the environment.

Example

provider "aws" {
  region = "eu-west-2"
}

Related terms

Taught in

References

Certification courses