Hi
Trying to use terraform to deploy 3 clusters on different AWS regions -
module "clusters" {
source = "../modules/aws-cluster"
for_each = toset(["eu-west-1", "us-east-1", "us-west-2"])
providers = {
aws = aws.eu-west-1
}
environment = "c${each.key}.${var.environment}"
region = each.value
instance_type = var.instance_type
The issue is with the provider part since each instance of it should be on a different AWS region.
providers = {
aws = aws. ["eu-west-1", "us-east-1", "us-west-2"]
}
Until now couldn’t find something similar to it. Can someone help, please?