Home / Articles
Automation
Terraform across multiple clouds: AWS, Azure, Google Cloud, OVHcloud and Kubernetes Use Terraform with the main providers: aws, azurerm, google, ovh and openstack, kubernetes and helm, authentication for each provider, provider aliases for several regions or accounts, and emulators to practice.
Martin LEKPA 4 min read Published 28/10/2026 Updated 08/11/2026
1. The main providers # Authentication and examples.
Table # Multi-cloud does not mean identical code: each cloud has its own resources. Provider Recommended authentication Example resource aws IAM role (SSO locally, OIDC in CI) aws_s3_bucketazurerm az login or federated identity azurerm_storage_accountgoogle gcloud auth application-default login or WIF google_storage_bucketovh / openstack OVHcloud API key, openrc file openstack_compute_instance_v2kubernetes / helm kubeconfig helm_release
2. Several regions or accounts # Provider aliases.
Example # provider "aws" { region = "eu-west-3" }
provider "aws" {
alias = "secours"
region = "eu-central-1"
}
resource "aws_s3_bucket" "principal" { bucket = "donnees-paris-123" }
resource "aws_s3_bucket" "replique" {
provider = aws.secours
bucket = "donnees-francfort-123"
}3. Practicing at no cost # Emulators and mocks.
Options # LocalStack and tflocal for the aws provider.Azurite for Azure storage (through application code), and Bicep/Terraform templates validated locally. Google emulators (Pub/Sub, Firestore) for application code. terraform test's mock_provider for any provider, including openstack and ovh. kind or k3d for the kubernetes and helm providers.
Martin LEKPA Tech Lead et formateur Observabilité
Web →
Related articles Understand Terraform: declarative infrastructure as code, architecture (core, providers, state), the init, pl…
Writing Terraform: terraform, provider, resource and data blocks, typed variables with validation, locals, ou…
Manage Terraform state: the role of the state file, sensitive data, remote backends (S3, azurerm, gcs, HCP Te…
Get new articles and courses A weekly or monthly digest, as you prefer, only when there is something new. Unsubscribe in one click.
×
♥ SUPPORT US
Support RousselTM Learning
Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.
Or scan this QR code with your phone
Thank you, every contribution counts!