Removing infra control
This commit is contained in:
parent
21f7b09b28
commit
013dbbf1b6
@ -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
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
data "aws_lb" "alpha" {
|
|
||||||
arn = "arn:aws:elasticloadbalancing:us-west-1:805875567437:loadbalancer/app/alpha-lb/33dad7632a052b70"
|
|
||||||
name = "alpha-lb"
|
|
||||||
}
|
|
28
infra/dns.tf
28
infra/dns.tf
@ -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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -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
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
Resources Defined Here
|
|
||||||
|
|
||||||
* Route53 Zone
|
|
||||||
* ACM Certificate
|
|
||||||
* S3 bucket for website & Terraform state
|
|
||||||
|
|
||||||
|
|
@ -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="<preferred-region>"
|
|
||||||
|
|
||||||
# AWS Creds from terraform
|
|
||||||
export TF_VAR_aws_key="$(pass my_aws_key)"
|
|
||||||
export TF_VAR_aws_secret="$(pass my_aws_secret)"
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
|
|
Loading…
Reference in New Issue
Block a user