Commit c59b0e3f authored by drechsau's avatar drechsau
Browse files

patterns fixed

parent 47de1143
...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-a" { ...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-a" {
resource "aws_nat_gateway" "natgw-a" { resource "aws_nat_gateway" "natgw-a" {
allocation_id = "${aws_eip.natgw-a.id}" allocation_id = "${aws_eip.natgw-a.id}"
subnet_id = "${aws_subnet.drone-deploy-mgmt-a.id}" subnet_id = "${aws_subnet.drone-deploy-mgmt-a.id}"
tags {
Name = "${var.name}-natgw-a"
}
} }
# create route tables # create route tables
...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-a" { ...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-a" {
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
resource "aws_route_table_association" "c1-elb-a" { resource "aws_route_table_association" "elb-a" {
subnet_id = "${aws_subnet.c1-elb-a.id}" subnet_id = "${aws_subnet.elb-a.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
#resource "aws_route_table_association" "c1-databases-a" { #resource "aws_route_table_association" "databases-a" {
# subnet_id = "${aws_subnet.c1-databases-a.id}" # subnet_id = "${aws_subnet.databases-a.id}"
# #
# route_table_id = "${aws_route_table.az-a.id}" # route_table_id = "${aws_route_table.az-a.id}"
#} #}
#resource "aws_route_table_association" "c1-elasticache-a" { #resource "aws_route_table_association" "elasticache-a" {
# subnet_id = "${aws_subnet.c1-elasticache-a.id}" # subnet_id = "${aws_subnet.elasticache-a.id}"
# #
# route_table_id = "${aws_route_table.az-a.id}" # route_table_id = "${aws_route_table.az-a.id}"
#} #}
resource "aws_route_table_association" "c1-docker-pub-a" { resource "aws_route_table_association" "docker-pub-a" {
subnet_id = "${aws_subnet.c1-docker-pub-a.id}" subnet_id = "${aws_subnet.docker-pub-a.id}"
#route_table_id = "${module.vpc.public_route_table_id}" #route_table_id = "${module.vpc.public_route_table_id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
resource "aws_route_table_association" "c1-docker-priv-a" { resource "aws_route_table_association" "docker-priv-a" {
subnet_id = "${aws_subnet.c1-docker-priv-a.id}" subnet_id = "${aws_subnet.docker-priv-a.id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
resource "aws_route_table_association" "c1-app-a" { resource "aws_route_table_association" "app-a" {
subnet_id = "${aws_subnet.c1-app-a.id}" subnet_id = "${aws_subnet.app-a.id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
resource "aws_route_table_association" "c1-admin-a" { resource "aws_route_table_association" "admin-a" {
subnet_id = "${aws_subnet.c1-admin-a.id}" subnet_id = "${aws_subnet.admin-a.id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
resource "aws_route_table_association" "c1-elb-admin-a" { resource "aws_route_table_association" "elb-admin-a" {
subnet_id = "${aws_subnet.c1-elb-admin-a.id}" subnet_id = "${aws_subnet.elb-admin-a.id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
resource "aws_route_table_association" "c1-elb-client-a" { resource "aws_route_table_association" "elb-client-a" {
subnet_id = "${aws_subnet.c1-elb-client-a.id}" subnet_id = "${aws_subnet.elb-client-a.id}"
route_table_id = "${aws_route_table.az-a.id}" route_table_id = "${aws_route_table.az-a.id}"
} }
#resource "aws_route_table_association" "c1-efs-a" { #resource "aws_route_table_association" "efs-a" {
# subnet_id = "${aws_subnet.c1-efs-a.id}" # subnet_id = "${aws_subnet.efs-a.id}"
# #
# route_table_id = "${aws_route_table.az-a.id}" # route_table_id = "${aws_route_table.az-a.id}"
#} #}
resource "aws_route_table_association" "c1-cmgmt-a" { resource "aws_route_table_association" "cmgmt-a" {
subnet_id = "${aws_subnet.c1-cmgmt-a.id}" subnet_id = "${aws_subnet.cmgmt-a.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-b" { ...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-b" {
resource "aws_nat_gateway" "natgw-b" { resource "aws_nat_gateway" "natgw-b" {
allocation_id = "${aws_eip.natgw-b.id}" allocation_id = "${aws_eip.natgw-b.id}"
subnet_id = "${aws_subnet.drone-deploy-mgmt-b.id}" subnet_id = "${aws_subnet.drone-deploy-mgmt-b.id}"
tags {
Name = "${var.name}-natgw-b"
}
} }
# create route tables # create route tables
...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-b" { ...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-b" {
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
resource "aws_route_table_association" "c1-elb-b" { resource "aws_route_table_association" "elb-b" {
subnet_id = "${aws_subnet.c1-elb-b.id}" subnet_id = "${aws_subnet.elb-b.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
#resource "aws_route_table_association" "c1-databases-b" { #resource "aws_route_table_association" "databases-b" {
# subnet_id = "${aws_subnet.c1-databases-b.id}" # subnet_id = "${aws_subnet.databases-b.id}"
# #
# route_table_id = "${aws_route_table.az-b.id}" # route_table_id = "${aws_route_table.az-b.id}"
#} #}
#resource "aws_route_table_association" "c1-elasticache-b" { #resource "aws_route_table_association" "elasticache-b" {
# subnet_id = "${aws_subnet.c1-elasticache-b.id}" # subnet_id = "${aws_subnet.elasticache-b.id}"
# #
# route_table_id = "${aws_route_table.az-b.id}" # route_table_id = "${aws_route_table.az-b.id}"
#} #}
resource "aws_route_table_association" "c1-docker-pub-b" { resource "aws_route_table_association" "docker-pub-b" {
subnet_id = "${aws_subnet.c1-docker-pub-b.id}" subnet_id = "${aws_subnet.docker-pub-b.id}"
#route_table_id = "${module.vpc.public_route_table_id}" #route_table_id = "${module.vpc.public_route_table_id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
resource "aws_route_table_association" "c1-docker-priv-b" { resource "aws_route_table_association" "docker-priv-b" {
subnet_id = "${aws_subnet.c1-docker-priv-b.id}" subnet_id = "${aws_subnet.docker-priv-b.id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
resource "aws_route_table_association" "c1-app-b" { resource "aws_route_table_association" "app-b" {
subnet_id = "${aws_subnet.c1-app-b.id}" subnet_id = "${aws_subnet.app-b.id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
resource "aws_route_table_association" "c1-admin-b" { resource "aws_route_table_association" "admin-b" {
subnet_id = "${aws_subnet.c1-admin-b.id}" subnet_id = "${aws_subnet.admin-b.id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
resource "aws_route_table_association" "c1-elb-admin-b" { resource "aws_route_table_association" "elb-admin-b" {
subnet_id = "${aws_subnet.c1-elb-admin-b.id}" subnet_id = "${aws_subnet.elb-admin-b.id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
resource "aws_route_table_association" "c1-elb-client-b" { resource "aws_route_table_association" "elb-client-b" {
subnet_id = "${aws_subnet.c1-elb-client-b.id}" subnet_id = "${aws_subnet.elb-client-b.id}"
route_table_id = "${aws_route_table.az-b.id}" route_table_id = "${aws_route_table.az-b.id}"
} }
#resource "aws_route_table_association" "c1-efs-b" { #resource "aws_route_table_association" "efs-b" {
# subnet_id = "${aws_subnet.c1-efs-b.id}" # subnet_id = "${aws_subnet.efs-b.id}"
# #
# route_table_id = "${aws_route_table.az-b.id}" # route_table_id = "${aws_route_table.az-b.id}"
#} #}
resource "aws_route_table_association" "c1-cmgmt-b" { resource "aws_route_table_association" "cmgmt-b" {
subnet_id = "${aws_subnet.c1-cmgmt-b.id}" subnet_id = "${aws_subnet.cmgmt-b.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-c" { ...@@ -5,6 +5,10 @@ resource "aws_eip" "natgw-c" {
resource "aws_nat_gateway" "natgw-c" { resource "aws_nat_gateway" "natgw-c" {
allocation_id = "${aws_eip.natgw-c.id}" allocation_id = "${aws_eip.natgw-c.id}"
subnet_id = "${aws_subnet.drone-deploy-mgmt-c.id}" subnet_id = "${aws_subnet.drone-deploy-mgmt-c.id}"
tags {
Name = "${var.name}-natgw-c"
}
} }
# create route tables # create route tables
...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-c" { ...@@ -32,69 +36,69 @@ resource "aws_route_table_association" "drone-deploy-mgmt-c" {
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
resource "aws_route_table_association" "c1-elb-c" { resource "aws_route_table_association" "elb-c" {
subnet_id = "${aws_subnet.c1-elb-c.id}" subnet_id = "${aws_subnet.elb-c.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
#resource "aws_route_table_association" "c1-databases-c" { #resource "aws_route_table_association" "databases-c" {
# subnet_id = "${aws_subnet.c1-databases-c.id}" # subnet_id = "${aws_subnet.databases-c.id}"
# #
# route_table_id = "${aws_route_table.az-c.id}" # route_table_id = "${aws_route_table.az-c.id}"
#} #}
#resource "aws_route_table_association" "c1-elasticache-c" { #resource "aws_route_table_association" "elasticache-c" {
# subnet_id = "${aws_subnet.c1-elasticache-c.id}" # subnet_id = "${aws_subnet.elasticache-c.id}"
# #
# route_table_id = "${aws_route_table.az-c.id}" # route_table_id = "${aws_route_table.az-c.id}"
#} #}
resource "aws_route_table_association" "c1-docker-pub-c" { resource "aws_route_table_association" "docker-pub-c" {
subnet_id = "${aws_subnet.c1-docker-pub-c.id}" subnet_id = "${aws_subnet.docker-pub-c.id}"
#route_table_id = "${module.vpc.public_route_table_id}" #route_table_id = "${module.vpc.public_route_table_id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
resource "aws_route_table_association" "c1-docker-priv-c" { resource "aws_route_table_association" "docker-priv-c" {
subnet_id = "${aws_subnet.c1-docker-priv-c.id}" subnet_id = "${aws_subnet.docker-priv-c.id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
resource "aws_route_table_association" "c1-app-c" { resource "aws_route_table_association" "app-c" {
subnet_id = "${aws_subnet.c1-app-c.id}" subnet_id = "${aws_subnet.app-c.id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
resource "aws_route_table_association" "c1-admin-c" { resource "aws_route_table_association" "admin-c" {
subnet_id = "${aws_subnet.c1-admin-c.id}" subnet_id = "${aws_subnet.admin-c.id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
resource "aws_route_table_association" "c1-elb-admin-c" { resource "aws_route_table_association" "elb-admin-c" {
subnet_id = "${aws_subnet.c1-elb-admin-c.id}" subnet_id = "${aws_subnet.elb-admin-c.id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
resource "aws_route_table_association" "c1-elb-client-c" { resource "aws_route_table_association" "elb-client-c" {
subnet_id = "${aws_subnet.c1-elb-client-c.id}" subnet_id = "${aws_subnet.elb-client-c.id}"
route_table_id = "${aws_route_table.az-c.id}" route_table_id = "${aws_route_table.az-c.id}"
} }
#resource "aws_route_table_association" "c1-efs-c" { #resource "aws_route_table_association" "efs-c" {
# subnet_id = "${aws_subnet.c1-efs-c.id}" # subnet_id = "${aws_subnet.efs-c.id}"
# #
# route_table_id = "${aws_route_table.az-c.id}" # route_table_id = "${aws_route_table.az-c.id}"
#} #}
resource "aws_route_table_association" "c1-cmgmt-c" { resource "aws_route_table_association" "cmgmt-c" {
subnet_id = "${aws_subnet.c1-cmgmt-c.id}" subnet_id = "${aws_subnet.cmgmt-c.id}"
route_table_id = "${module.vpc.public_route_table_id}" route_table_id = "${module.vpc.public_route_table_id}"
} }
...@@ -42,215 +42,215 @@ output "sn-drone-deploy-mgmt-c-cidr" { ...@@ -42,215 +42,215 @@ output "sn-drone-deploy-mgmt-c-cidr" {
value = "${aws_subnet.drone-deploy-mgmt-c.cidr_block}" value = "${aws_subnet.drone-deploy-mgmt-c.cidr_block}"
} }
output "sn-c1-elb-a" { output "sn-elb-a" {
value = "${aws_subnet.c1-elb-a.id}" value = "${aws_subnet.elb-a.id}"
} }
output "sn-c1-elb-b" { output "sn-elb-b" {
value = "${aws_subnet.c1-elb-b.id}" value = "${aws_subnet.elb-b.id}"
} }
output "sn-c1-elb-c" { output "sn-elb-c" {
value = "${aws_subnet.c1-elb-c.id}" value = "${aws_subnet.elb-c.id}"
} }
output "sn-c1-efs-a" { output "sn-efs-a" {
value = "${aws_subnet.c1-efs-a.id}" value = "${aws_subnet.efs-a.id}"
} }
output "sn-c1-efs-b" { output "sn-efs-b" {
value = "${aws_subnet.c1-efs-b.id}" value = "${aws_subnet.efs-b.id}"
} }
output "sn-c1-efs-c" { output "sn-efs-c" {
value = "${aws_subnet.c1-efs-c.id}" value = "${aws_subnet.efs-c.id}"
} }
output "sn-c1-databases-a" { output "sn-databases-a" {
value = "${aws_subnet.c1-databases-a.id}" value = "${aws_subnet.databases-a.id}"
} }
output "sn-c1-databases-b" { output "sn-databases-b" {
value = "${aws_subnet.c1-databases-b.id}" value = "${aws_subnet.databases-b.id}"
} }
output "sn-c1-databases-c" { output "sn-databases-c" {
value = "${aws_subnet.c1-databases-c.id}" value = "${aws_subnet.databases-c.id}"
} }
output "sn-c1-elasticache-a" { output "sn-elasticache-a" {
value = "${aws_subnet.c1-elasticache-a.id}" value = "${aws_subnet.elasticache-a.id}"
} }
output "sn-c1-elasticache-b" { output "sn-elasticache-b" {
value = "${aws_subnet.c1-elasticache-b.id}" value = "${aws_subnet.elasticache-b.id}"
} }
output "sn-c1-elasticache-c" { output "sn-elasticache-c" {
value = "${aws_subnet.c1-elasticache-c.id}" value = "${aws_subnet.elasticache-c.id}"
} }
output "sn-c1-docker-pub-a" { output "sn-docker-pub-a" {
value = "${aws_subnet.c1-docker-pub-a.id}" value = "${aws_subnet.docker-pub-a.id}"
} }
output "sn-c1-docker-pub-b" { output "sn-docker-pub-b" {
value = "${aws_subnet.c1-docker-pub-b.id}" value = "${aws_subnet.docker-pub-b.id}"
} }
output "sn-c1-docker-pub-c" { output "sn-docker-pub-c" {
value = "${aws_subnet.c1-docker-pub-c.id}" value = "${aws_subnet.docker-pub-c.id}"
} }
output "sn-c1-docker-priv-a" { output "sn-docker-priv-a" {
value = "${aws_subnet.c1-docker-priv-a.id}" value = "${aws_subnet.docker-priv-a.id}"
} }
output "sn-c1-docker-priv-b" { output "sn-docker-priv-b" {
value = "${aws_subnet.c1-docker-priv-b.id}" value = "${aws_subnet.docker-priv-b.id}"
} }
output "sn-c1-docker-priv-c" { output "sn-docker-priv-c" {
value = "${aws_subnet.c1-docker-priv-c.id}" value = "${aws_subnet.docker-priv-c.id}"
} }
output "sn-c1-app-a" { output "sn-app-a" {
value = "${aws_subnet.c1-app-a.id}" value = "${aws_subnet.app-a.id}"
} }
output "sn-c1-app-b" { output "sn-app-b" {
value = "${aws_subnet.c1-app-b.id}" value = "${aws_subnet.app-b.id}"
} }
output "sn-c1-app-c" { output "sn-app-c" {
value = "${aws_subnet.c1-app-c.id}" value = "${aws_subnet.app-c.id}"
} }
output "sn-c1-admin-a" { output "sn-admin-a" {
value = "${aws_subnet.c1-admin-a.id}" value = "${aws_subnet.admin-a.id}"
} }
output "sn-c1-admin-b" { output "sn-admin-b" {
value = "${aws_subnet.c1-admin-b.id}" value = "${aws_subnet.admin-b.id}"
} }
output "sn-c1-admin-c" { output "sn-admin-c" {
value = "${aws_subnet.c1-admin-c.id}" value = "${aws_subnet.admin-c.id}"
} }
output "sn-c1-cmgmt-a" { output "sn-cmgmt-a" {
value = "${aws_subnet.c1-cmgmt-a.id}" value = "${aws_subnet.cmgmt-a.id}"
} }
output "sn-c1-cmgmt-b" { output "sn-cmgmt-b" {
value = "${aws_subnet.c1-cmgmt-b.id}" value = "${aws_subnet.cmgmt-b.id}"
} }
output "sn-c1-cmgmt-c" { output "sn-cmgmt-c" {
value = "${aws_subnet.c1-cmgmt-c.id}" value = "${aws_subnet.cmgmt-c.id}"
} }
output "c1-cmgmt-cidr" { output "cmgmt-cidr" {
value = [