zrgo1w
Last Updated: April 18, 2017
·
27
· celc
Ebc47ee771e1695743e6b79c0821f37f

Using multi regions with terraform.

CloudFront only supports virginia certs, but we're deploying to asia pacific so we need to switch regions specifically for the cert. You can create an additional aws provider with a different reion by giving it an alias like so:

provider "aws" {
  region = "ap-southeast-1"
}

provider "aws" {
  alias = "virginia"
  region = "us-east-1"
}

data "aws_acm_certificate" "estel-sg" {
  domain = "estel.sg"
  provider = "aws.virginia"
}
Say Thanks
Respond