UPD: replaced region shortname with just the region prefix
This commit is contained in:
parent
346acca7fd
commit
a4bdee471e
@ -4,10 +4,9 @@ variable "project" {}
|
|||||||
variable "application" {}
|
variable "application" {}
|
||||||
variable "default-tags" {}
|
variable "default-tags" {}
|
||||||
variable "aws-region" {}
|
variable "aws-region" {}
|
||||||
variable "aws-region-short" {}
|
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
resource-prefix = "${var.environment}-${var.aws-region-short}-${var.customer-name}-${var.project}"
|
resource-prefix = "${var.environment}-${substr(var.aws-region,0,2)}-${var.customer-name}-${var.project}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# VPC variables
|
# VPC variables
|
||||||
|
@ -122,15 +122,15 @@ resource "aws_route" "private-routes" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_route_table_association" "public_route_association" {
|
resource "aws_route_table_association" "public_route_association" {
|
||||||
for_each = toset(aws_subnet.public-subnets.*.id)
|
count = length(aws_subnet.public-subnets)
|
||||||
route_table_id = aws_route_table.public-route-table[0].id
|
route_table_id = aws_route_table.public-route-table[0].id
|
||||||
subnet_id = each.value
|
subnet_id = aws_subnet.public-subnets[count.index].id
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_route_table_association" "private_route_association" {
|
resource "aws_route_table_association" "private_route_association" {
|
||||||
for_each = toset(aws_subnet.private-subnets.*.id)
|
count = length(aws_subnet.private-subnets)
|
||||||
route_table_id = aws_route_table.private-route-table[0].id
|
route_table_id = aws_route_table.private-route-table[0].id
|
||||||
subnet_id = each.value
|
subnet_id = aws_subnet.private-subnets[count.index].id
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user