From 013dbbf1b6c564342d0c5b81e70e8ba531ad6737 Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 5 Oct 2023 23:13:36 -0700 Subject: [PATCH] Removing infra control --- infra/Makefile | 12 ------------ infra/backend.tf | 15 --------------- infra/data.tf | 4 ---- infra/dns.tf | 28 ---------------------------- infra/local.tf | 20 -------------------- infra/readme | 7 ------- infra/sample-set-env.sh | 13 ------------- infra/variables.tf | 1 - 8 files changed, 100 deletions(-) delete mode 100644 infra/Makefile delete mode 100644 infra/backend.tf delete mode 100644 infra/data.tf delete mode 100644 infra/dns.tf delete mode 100644 infra/local.tf delete mode 100644 infra/readme delete mode 100644 infra/sample-set-env.sh delete mode 100644 infra/variables.tf 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 @@ -