CirclesUBI / infrastructure-provisioning

Infrastructure and Services for Circles
GNU Affero General Public License v3.0
5 stars 2 forks source link

[circles-api] Set RDS CIDR blocks to be explicit #22

Closed edzillion closed 5 years ago

edzillion commented 5 years ago
resource "aws_subnet" "rds" {
  count = "${length(var.availability_zones)}"
  vpc_id = "${var.vpc_id}"
  cidr_block = "10.0.${length(var.availability_zones) + count.index}.0/24"
  map_public_ip_on_launch = true
  availability_zone = "${element(var.availability_zones, count.index)}"
  tags {
    Name = "rds-${element(var.availability_zones, count.index)}"
    Environment = "${var.environment}"
  }
}

These should be set explicitly and passed into the module, as this could cause problems down the line. I think it makes sense to keep them on the 10.0.3.X subnet

edzillion commented 5 years ago

Fixed in: https://github.com/CirclesUBI/infrastructure-provisioning/pull/28/