diff --git a/stun_server/main.tf b/stun_server/main.tf index e82e20a..bc10362 100644 --- a/stun_server/main.tf +++ b/stun_server/main.tf @@ -12,6 +12,16 @@ provider "aws" { region = "us-east-1" } +provider "aws" { + alias = "eu-central-1" + region = "eu-central-1" +} + +provider "aws" { + alias = "ap-southeast-1" + region = "ap-southeast-1" +} + module "us_east_1" { source = "./region" @@ -30,6 +40,10 @@ module "us_east_1" { module "eu_central_1" { source = "./region" + providers = { + aws = aws.eu-central-1 + } + region = "eu-central-1" domain_name = var.domain_name image_tag = var.image_tag @@ -45,6 +59,10 @@ module "eu_central_1" { module "ap_southeast_1" { source = "./region" + providers = { + aws = aws.ap-southeast-1 + } + region = "ap-southeast-1" domain_name = var.domain_name image_tag = var.image_tag diff --git a/stun_server/region/module.tf b/stun_server/region/module.tf index 51a4052..613249b 100644 --- a/stun_server/region/module.tf +++ b/stun_server/region/module.tf @@ -3,10 +3,6 @@ locals { infrastructure_region_outputs = data.tfe_outputs.infrastructure.values[data.aws_region.current.name] } -provider "aws" { - region = var.region -} - data "tfe_outputs" "infrastructure" { organization = "home_assistant" workspace = "infrastructure"