diff --git a/infra/Makefile b/infra/Makefile deleted file mode 100644 index 5ff02c0..0000000 --- a/infra/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -plan=out.plan - -SHELL := /bin/bash - -$(plan): *.tf - source set-env.sh && terraform plan -input=false -out $(plan) - -push: build - source set-env.sh && terraform apply $(plan) - - -.PHONY: build push create-bucket diff --git a/infra/backend.tf b/infra/backend.tf deleted file mode 100644 index 8940e10..0000000 --- a/infra/backend.tf +++ /dev/null @@ -1,15 +0,0 @@ -terraform { - required_version = ">= 1.5" - backend "s3" { - bucket = "project-temper-infra" - key = "infra/state/build.tfstate" - region = "us-west-1" - encrypt = true - } - required_providers { - aws = { - source = "hashicorp/aws" - version = "4.13.0" - } - } -} diff --git a/infra/data.tf b/infra/data.tf deleted file mode 100644 index 77618b5..0000000 --- a/infra/data.tf +++ /dev/null @@ -1,4 +0,0 @@ -data "aws_lb" "alpha" { - arn = "arn:aws:elasticloadbalancing:us-west-1:805875567437:loadbalancer/app/alpha-lb/33dad7632a052b70" - name = "alpha-lb" -} diff --git a/infra/dns.tf b/infra/dns.tf deleted file mode 100644 index 5833161..0000000 --- a/infra/dns.tf +++ /dev/null @@ -1,28 +0,0 @@ -resource "aws_route53_zone" "main" { - name = "temper.tv" - comment = "Main zone for temper.tv" -} - -# Points to the Alpha LB in Project Athens -resource "aws_route53_record" "main" { - zone_id = aws_route53_zone.main.id - name = "temper.tv" - type = "A" - - alias { - name = data.aws_lb.alpha.dns_name - zone_id = data.aws_lb.alpha.zone_id - evaluate_target_health = true - } -} - -resource "aws_route53_record" "txt" { - zone_id = aws_route53_zone.main.id - name = "temper.tv" - type = "TXT" - ttl = 300 - records = [ - "v=spf1 include:_mailcust.gandi.net ?all" - ] -} - diff --git a/infra/local.tf b/infra/local.tf deleted file mode 100644 index 2164a9b..0000000 --- a/infra/local.tf +++ /dev/null @@ -1,20 +0,0 @@ -locals { - temper-tv-records = [ - # These came with the zone for some reason so there's no need to - # insert them ourselves IG /shrug - # { - # name = "temper.tv" - # type = "NS" - # ttl = 172800 - # records = [ - # "ns-657.awsdns-18.net, - # "ns-1756.awsdns-27.co.uk", - # "ns-1366.awsdns-42.org", - # "ns-288.awsdns-36.com", - # ] - # } - # NOTE SOA record is also taken care of for us :) - # Required for mails to work here - ] -} - diff --git a/infra/readme b/infra/readme deleted file mode 100644 index cee5fce..0000000 --- a/infra/readme +++ /dev/null @@ -1,7 +0,0 @@ -Resources Defined Here - -* Route53 Zone -* ACM Certificate -* S3 bucket for website & Terraform state - - diff --git a/infra/sample-set-env.sh b/infra/sample-set-env.sh deleted file mode 100644 index d19033e..0000000 --- a/infra/sample-set-env.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -[[ "${BASH_SOURCE[0]}" == "${0}" ]] && echo Script must be source\'d && exit 1 - -# For the cli -export AWS_ACCESS_KEY_ID="$(pass my_aws_key)" -export AWS_SECRET_ACCESS_KEY="$(pass my_aws_secret)" -export AWS_DEFAULT_REGION="" - -# AWS Creds from terraform -export TF_VAR_aws_key="$(pass my_aws_key)" -export TF_VAR_aws_secret="$(pass my_aws_secret)" - diff --git a/infra/variables.tf b/infra/variables.tf deleted file mode 100644 index 8b13789..0000000 --- a/infra/variables.tf +++ /dev/null @@ -1 +0,0 @@ -