Terraform providers are plugins that let Terraform manage resources through a platform's API, such as AWS, Azure, Google Cloud or GitHub. You declare them in a required_providers block, set them up in provider blocks, and terraform init downloads them. Every resource and data source you write belongs to a provider.

The guides here start with an architecture diagram showing how Terraform Core, providers, state and the plan and apply workflow fit together. They also explain provider blocks, namespaces and aliases for running several configurations of the same provider. Authentication posts cover Azure through the Azure CLI, managed identity and service principals. For Google Cloud, they cover application default credentials, OIDC federation, and creating service account keys. Hands-on examples create a GitHub repository, build AWS VPCs and EC2 instances for labs, and use data sources to look up existing resources. Several posts cover provisioners: local-exec, remote-exec on AWS and Azure (including Windows hosts), and installing Ansible to run a playbook.

These posts are useful for beginners writing their first multi-cloud configuration and for engineers setting up provider credentials in CI pipelines. Trainers who need ready-made lab and demo code will also find them helpful.

Start here

Latest Terraform Providers articles

Terraform Architecture and Components through diagram

Terraform Architecture & End-to-End Workflow This reference architecture covers the standard Terraform CLI workflow, including execution from a developer machine or CI/CD runner. It shows the relationship…

Read More

Google Cloud: Create and delete service account keys

The var.credentials_file_path is a Terraform variable that holds the file path to your Google Cloud Platform (GCP) service account credentials JSON file. This file is used by…

Read More

Terrafrom Tutorials – remote-exec provisioner using AWS & Azure providers

the remote-exec provisioner in Terraform is used to execute commands remotely on a target resource after it’s been created. This is often used for post-deployment configuration or…

Read More

Terraform Tutorials: What is namespace / Alias

In Terraform, a namespace is a logical grouping or isolation mechanism for resources within a cloud provider. It allows you to separate resources based on different environments,…

Read More

Terraform Tutorials: List of Terraform Blocks with Explanation

Example: terraform { required_version = “>= 0.14” backend “s3” { bucket = “my-terraform-state” key = “terraform.tfstate” region = “us-west-2” } } Example: provider “aws” { region =…

Read More

Data Sources in Terraform resources explained with example

This may include: Here’s an example of using the AWS data source in Terraform to retrieve information about an existing Amazon S3 bucket In this example, we’re…

Read More

Google cloud Platform Authentication Method with Terraform

Method 1 – User Application Default Credentials (“ADCs”) Application Default Credentials (ADC) provide a method to get credentials used in calling Google APIs. The gcloud auth application-default…

Read More

How Terraform Authenticate to Azure?

How Terraform Authenticate to Azure? Authenticating to Azure using the Azure CLI Authenticating to Azure using Managed Service Identity Authenticating to Azure using a Service Principal and…

Read More

Example Terraform code to Create Github Repository

Generate GITHUB ACCESS Token Write Providers.tf Write Resources-github.tf Run Following Commands Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing…

Read More

Example of Terraform Code for Lab and Demo

Example Code of Terraform AWS VPC Terraform Hello world Program Terraform example program for aws_security_group, aws_instance and provisioner Working with Terraform AWS provider, resources aws_key_pair Rajesh KumarI’m…

Read More

Terraform Install Ansible and Run Playbook Example

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Example Code of Terraform AWS VPC

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Terraform example program for aws_security_group, aws_instance and provisioner

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Example Terraform Code for AWS provider, resources aws_key_pair

This command would generate a public and private key $ ssh-keygen -f terraform_ec2_key This resources would import aws key pair Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE,…

Read More

Terraform Advance Workflow loop explained!!!

validate – Validates the Terraform files init – Init. Initialize the (local) Terraform environment. Usually executed only once per session. providers – Prints a tree of the…

Read More

Understanding local-exec provisioner in terraform

Terraform Provisioners can be used to do specific actions on the local machine or on a remote machine in order to prepare servers or other infrastructure resources….

Read More

Terraform Providers: frequently asked questions

What is a Terraform provider?

A provider is a plugin that translates Terraform resources and data sources into API calls for a specific platform, such as AWS, Azure, Google Cloud or GitHub. Terraform downloads the providers a configuration needs when you run terraform init.

How do I use the same provider with different regions or accounts?

Define extra provider blocks with an alias argument, then select one on a resource or module with provider = aws.west (or the equivalent for your provider).

How do I pin a provider version?

Set a version constraint for each provider in the required_providers block inside the terraform block. Terraform records the exact versions it selected in .terraform.lock.hcl, which you should commit.

Should I use provisioners like local-exec and remote-exec?

HashiCorp recommends provisioners only as a last resort, because Terraform cannot track what they change. Where possible, use provider resources, cloud-init or user data, or a configuration management tool instead.