1. The main providers #
Authentication and examples.
Table #
| Provider | Recommended authentication | Example resource |
|---|---|---|
| aws | IAM role (SSO locally, OIDC in CI) | aws_s3_bucket |
| azurerm | az login or federated identity | azurerm_storage_account |
| gcloud auth application-default login or WIF | google_storage_bucket | |
| ovh / openstack | OVHcloud API key, openrc file | openstack_compute_instance_v2 |
| kubernetes / 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
tflocalfor 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_providerfor any provider, including openstack and ovh. - kind or k3d for the kubernetes and helm providers.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Terraform best practices: structure, state, security, review and maintenance
Terraform best practices for teams: repository structure, naming, pinned versions, encrypted and ...
Operating OVHcloud: Terraform, monitoring, security, costs and sovereignty
Operate OVHcloud in production: infrastructure as code with the ovh and openstack Terraform provi...
Infrastructure as Code on AWS: CloudFormation, CDK, Terraform and Well-Architected
Describe and deploy your AWS infrastructure as code with CloudFormation, the CDK or Terraform, au...
Infrastructure as Code and GitOps: Terraform, Ansible and Argo CD
Manage infrastructure as code: declarative or imperative, Terraform (providers, state, plan, modu...
Operating Google Cloud: observability, security, infrastructure as code and costs
Operate Google Cloud: Cloud Monitoring, Cloud Logging and Cloud Trace (Google Cloud Observability...
Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD
Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...
OVHcloud best practices: organization, security, networking, backup and costs
Best practices for running OVHcloud Public Cloud in production: projects per environment, identit...
Compute on OVHcloud: Public Cloud instances and Managed Kubernetes Service
Choose and use OVHcloud compute: instance ranges (General Purpose, CPU, RAM, GPU, Discovery), ima...
Understanding OVHcloud: universes, regions, Public Cloud and tools
Discover OVHcloud, a European cloud provider: the Bare Metal, Hosted Private Cloud, Public Cloud ...