Commit 15456fac authored by Cameron McFarland's avatar Cameron McFarland

Reverting version change because the CI process needs changed to support this large of a change.

parent e63cd5f9
......@@ -10,11 +10,6 @@ may be more in use, but these are the primary services.
1. S3
1. VPC (Subnets, VPC, Internet Gateways, Routes, Routing Tables)
## Terraform Version
This environment is using Terraform version 0.12.0. The configuration for the
S3 remote state file is a little different. It is found at the top of the
main.tf file.
## Design Document
If you want to know more about the SnowPlow infrastructure, please consult
the design document. XXX
......
......@@ -50,8 +50,8 @@ EOF
resource "aws_iam_policy" "snowplow_enricher_policy" {
description = ""
name = "snowplow-enricher-policy"
path = "/"
name = "snowplow-enricher-policy"
path = "/"
policy = <<EOF
{
......@@ -151,41 +151,41 @@ resource "aws_vpc" "snowplow_vpc" {
cidr_block = "10.32.0.0/16"
tags = {
Name = "SnowPlow VPC"
Name = "SnowPlow VPC"
environment = "SnowPlow"
}
}
// Subnet
resource "aws_subnet" "snowplow_subnet_1" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.2.0/24"
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.2.0/24"
availability_zone = "us-east-1a"
tags = {
Name = "SnowPlow Subnet 1"
Name = "SnowPlow Subnet 1"
environment = "SnowPlow"
}
}
resource "aws_subnet" "snowplow_subnet_2" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.1.0/24"
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.1.0/24"
availability_zone = "us-east-1e"
tags = {
Name = "SnowPlow Subnet 2"
Name = "SnowPlow Subnet 2"
environment = "SnowPlow"
}
}
resource "aws_subnet" "snowplow_subnet_3" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.0.0/24"
vpc_id = "${aws_vpc.snowplow_vpc.id}"
cidr_block = "10.32.0.0/24"
availability_zone = "us-east-1b"
tags = {
Name = "SnowPlow Subnet 3"
Name = "SnowPlow Subnet 3"
environment = "SnowPlow"
}
}
......@@ -195,7 +195,7 @@ resource "aws_internet_gateway" "snowplow_gw" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
tags = {
Name = "SnowPlow Gateway"
Name = "SnowPlow Gateway"
environment = "SnowPlow"
}
}
......@@ -205,41 +205,41 @@ resource "aws_route_table" "snowplow_route_table" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
tags = {
Name = "SnowPlow Routing Table"
Name = "SnowPlow Routing Table"
environment = "SnowPlow"
}
}
resource "aws_main_route_table_association" "snowplow_main_route_table_association" {
vpc_id = "${aws_vpc.snowplow_vpc.id}"
vpc_id = "${aws_vpc.snowplow_vpc.id}"
route_table_id = "${aws_route_table.snowplow_route_table.id}"
}
resource "aws_route" "snowplow_route" {
route_table_id = "${aws_route_table.snowplow_route_table.id}"
route_table_id = "${aws_route_table.snowplow_route_table.id}"
destination_cidr_block = "0.0.0.0/0"
gateway_id = "${aws_internet_gateway.snowplow_gw.id}"
gateway_id = "${aws_internet_gateway.snowplow_gw.id}"
}
resource "aws_route_table_association" "snowplow_route_table_association_1" {
route_table_id = "${aws_route_table.snowplow_route_table.id}"
subnet_id = "${aws_subnet.snowplow_subnet_1.id}"
subnet_id = "${aws_subnet.snowplow_subnet_1.id}"
}
resource "aws_route_table_association" "snowplow_route_table_association_2" {
route_table_id = "${aws_route_table.snowplow_route_table.id}"
subnet_id = "${aws_subnet.snowplow_subnet_2.id}"
subnet_id = "${aws_subnet.snowplow_subnet_2.id}"
}
resource "aws_route_table_association" "snowplow_route_table_association_3" {
route_table_id = "${aws_route_table.snowplow_route_table.id}"
subnet_id = "${aws_subnet.snowplow_subnet_3.id}"
subnet_id = "${aws_subnet.snowplow_subnet_3.id}"
}
// Kinesis Streams
resource "aws_kinesis_stream" "snowplow_raw_good" {
name = "snowplow-raw-good"
shard_count = 1
name = "snowplow-raw-good"
shard_count = 1
retention_period = 48
shard_level_metrics = [
......@@ -253,8 +253,8 @@ resource "aws_kinesis_stream" "snowplow_raw_good" {
}
resource "aws_kinesis_stream" "snowplow_raw_bad" {
name = "snowplow-raw-bad"
shard_count = 1
name = "snowplow-raw-bad"
shard_count = 1
retention_period = 48
shard_level_metrics = [
......@@ -268,8 +268,8 @@ resource "aws_kinesis_stream" "snowplow_raw_bad" {
}
resource "aws_kinesis_stream" "snowplow_enriched_bad" {
name = "snowplow-enriched-bad"
shard_count = 1
name = "snowplow-enriched-bad"
shard_count = 1
retention_period = 48
shard_level_metrics = [
......@@ -283,8 +283,8 @@ resource "aws_kinesis_stream" "snowplow_enriched_bad" {
}
resource "aws_kinesis_stream" "snowplow_enriched_good" {
name = "snowplow-enriched-good"
shard_count = 1
name = "snowplow-enriched-good"
shard_count = 1
retention_period = 48
shard_level_metrics = [
......@@ -298,8 +298,8 @@ resource "aws_kinesis_stream" "snowplow_enriched_good" {
}
resource "aws_kinesis_stream" "snowplow_s3loader_bad" {
name = "snowplow-s3loader-bad"
shard_count = 1
name = "snowplow-s3loader-bad"
shard_count = 1
retention_period = 48
shard_level_metrics = [
......@@ -317,12 +317,12 @@ data "aws_ami" "amazonlinux2" {
most_recent = true
filter {
name = "name"
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
filter {
name = "virtualization-type"
name = "virtualization-type"
values = ["hvm"]
}
......@@ -332,11 +332,11 @@ data "aws_ami" "amazonlinux2" {
// Security Groups
resource "aws_launch_configuration" "snowplow_collector_launch_config" {
image_id = "${data.aws_ami.amazonlinux2.id}"
instance_type = "t2.micro"
image_id = "${data.aws_ami.amazonlinux2.id}"
instance_type = "t2.micro"
associate_public_ip_address = "true"
enable_monitoring = "false"
iam_instance_profile = "snowplow-collector-role"
enable_monitoring = "false"
iam_instance_profile = "snowplow-collector-role"
security_groups = [
"sg-0270f6c10c30d8bf3",
......@@ -581,11 +581,11 @@ EOUD
}
resource "aws_launch_configuration" "snowplow_s3loader_launch_config" {
image_id = "${data.aws_ami.amazonlinux2.id}"
instance_type = "t2.micro"
image_id = "${data.aws_ami.amazonlinux2.id}"
instance_type = "t2.micro"
associate_public_ip_address = "true"
enable_monitoring = "false"
iam_instance_profile = "snowplow-s3loader-role"
enable_monitoring = "false"
iam_instance_profile = "snowplow-s3loader-role"
security_groups = [
"sg-0270f6c10c30d8bf3",
......
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