-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
36 lines (35 loc) · 1.2 KB
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
locals {
account = "AWS_ACCOUNT_ID"
profile = "AWS_PROFILE_NAME"
all_regions = ["eu-west-2", "us-east-1", "us-west-1"]
hosted_zone_ids = {
"eu-west-2" = module.eu-west-2.hosted_zone_id
"us-east-1" = module.us-east-1.hosted_zone_id
"us-west-1" = module.us-west-1.hosted_zone_id
}
vpc_ids = {
"eu-west-2" = module.eu-west-2.vpc_id
"us-east-1" = module.us-east-1.vpc_id
"us-west-1" = module.us-west-1.vpc_id
}
cross_region_associations = {
for pair in setproduct(local.all_regions, local.all_regions) : "${pair[0]}-${pair[1]}" => {
source_region = pair[0]
target_region = pair[1]
} if pair[0] != pair[1]
}
vpc_peering_connections = {
"eu-west-2" = {
"us-east-1" = aws_vpc_peering_connection.eu_west_2_to_us_east_1.id,
"us-west-1" = aws_vpc_peering_connection.eu_west_2_to_us_west_1.id
},
"us-east-1" = {
"eu-west-2" = aws_vpc_peering_connection.eu_west_2_to_us_east_1.id,
"us-west-1" = aws_vpc_peering_connection.us_east_1_to_us_west_1.id
},
"us-west-1" = {
"eu-west-2" = aws_vpc_peering_connection.eu_west_2_to_us_west_1.id,
"us-east-1" = aws_vpc_peering_connection.us_east_1_to_us_west_1.id
}
}
}