33 lines
736 B
Plaintext
33 lines
736 B
Plaintext
<% local secrets = require "secrets" %>
|
|
<% local config = require "config" %>
|
|
|
|
# Things I did manually:
|
|
# Added a route to the internet gateway in the route table
|
|
|
|
terraform {
|
|
backend "local" {
|
|
path = ".terraform.tfstate"
|
|
}
|
|
required_providers {
|
|
aws = {
|
|
source = "hashicorp/aws"
|
|
version = "~> 5.45"
|
|
}
|
|
}
|
|
required_version = ">= 0.14.9"
|
|
}
|
|
|
|
provider "aws" {
|
|
access_key = "<%- secrets.access_key %>"
|
|
secret_key = "<%- secrets.secret_key %>"
|
|
region = "<%- config.aws_region %>"
|
|
}
|
|
|
|
<% local domain, tld = string.match(config.domain,"(.*)%.(.*)") %>
|
|
|
|
# This should be created manually, so it never gets accidentally destroyed.
|
|
# resource "aws_s3_bucket" "backup-bucket" {
|
|
# bucket = "txweaboo-backup"
|
|
# acl = "private"
|
|
# }
|