Difference between revisions of "Multiple providers"
Jump to navigation
Jump to search
↑ https://www.terraform.io/language/providers/configuration
Line 29: | Line 29: | ||
} | } | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Related == | == Related == |
Revision as of 05:19, 21 February 2022
You can optionally define multiple configurations for the same provider, and select which one to use on a per-resource or per-module basis. [1]
Example
# The default provider configuration; resources that begin with `aws_` will use # it as the default, and it can be referenced as `aws`. provider "aws" { region = "us-east-1" } # Additional provider configuration for west coast region; resources can # reference this as `aws.west`. provider "aws" { alias = "west" region = "us-west-2" }
terraform { required_providers { mycloud = { source = "mycorp/mycloud" version = "~> 1.0" configuration_aliases = [ mycloud.alternate ] } } }
Related
See also
- Terraform provider:
AWS, Cloudflare
,GoogleWorkspace
,Kubernetes, Helm, .terraform/providers/
,template
,tfe
,providers.tf, dns, hashicorp/, hashicorp/tls
, Terraform provider versioning, Libvirt, datadog,terraform providers, required_version, onepassword
,rancher2
,time, terraform.tf
- Certifications: Security certifications, Enterprise architecture, Coursera, AWS certifications, CertiProf, Pearson VUE, Terraform Associate, Freecram, ExamLabs
Advertising: