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