Commit c24ef45c authored by Cameron McFarland's avatar Cameron McFarland

Trying to add a new subnet so I don't run out of m5.large instances so much.

parent 3981eb58
......@@ -129,6 +129,17 @@ resource "aws_subnet" "snowplow_subnet_3" {
}
}
resource "aws_subnet" "snowplow_subnet_4" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.3.0/24"
availability_zone = "us-east-1c"
tags = {
Name = "SnowPlow Subnet 3"
environment = "SnowPlow"
}
}
// Internet Gateway
resource "aws_internet_gateway" "snowplow_gw" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
......@@ -175,6 +186,11 @@ resource "aws_route_table_association" "snowplow_route_table_association_3" {
subnet_id = "${aws_subnet.snowplow_subnet_3.id}"
}
resource "aws_route_table_association" "snowplow_route_table_association_4" {
route_table_id = "${aws_route_table.snowplow_route_table.id}"
subnet_id = "${aws_subnet.snowplow_subnet_4.id}"
}
// Security Groups
resource "aws_security_group" "snowplow_security_group" {
description = "For testing snowplow stuff"
......@@ -300,6 +316,8 @@ resource "aws_kinesis_stream" "snowplow_enriched_good" {
}
}
// Kinesis Firehose
// EC2 Launch Configs
data "aws_ami" "amazonlinux2" {
most_recent = true
......@@ -378,6 +396,13 @@ resource "aws_autoscaling_group" "snowplow_collector_autoscaling_group" {
"${aws_lb_target_group.snowplow_collector_lb_target_group.id}",
]
vpc_zone_identifier = [
"${aws_subnet.snowplow_subnet_1.id}",
"${aws_subnet.snowplow_subnet_2.id}",
"${aws_subnet.snowplow_subnet_3.id}",
"${aws_subnet.snowplow_subnet_4.id}",
]
enabled_metrics = [
"GroupStandbyInstances",
"GroupTotalInstances",
......@@ -408,6 +433,13 @@ resource "aws_autoscaling_group" "snowplow_enricher_autoscaling_group" {
min_size = "3"
desired_capacity = "3"
vpc_zone_identifier = [
"${aws_subnet.snowplow_subnet_1.id}",
"${aws_subnet.snowplow_subnet_2.id}",
"${aws_subnet.snowplow_subnet_3.id}",
"${aws_subnet.snowplow_subnet_4.id}",
]
enabled_metrics = [
"GroupStandbyInstances",
"GroupTotalInstances",
......@@ -442,6 +474,7 @@ resource "aws_lb" "snowplow_lb" {
"${aws_subnet.snowplow_subnet_1.id}",
"${aws_subnet.snowplow_subnet_2.id}",
"${aws_subnet.snowplow_subnet_3.id}",
"${aws_subnet.snowplow_subnet_4.id}",
]
tags = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment