Terraform Provider

· 1 min read · Terraform

A Terraform provider is a plugin, distributed from a registry, that translates resources in HCL into API calls of a platform. The aws provider manages AWS, and there are providers for Azure, Google Cloud, Kubernetes, Cloudflare, GitHub and thousands more.

providers.tf
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

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

terraform init downloads the providers and records their checksums in .terraform.lock.hcl. Multiple configurations of the same provider are selected with alias. OpenTofu 1.9 and later can also use for_each on providers.

See how the AWS provider authenticates and how to find the right resources.

More tutorials that use Terraform Provider

#Terraform #OpenTofu