This repository contains all the necessary modules needed to create AWS resources used by Hack for LA's projects.
Learn more at the incubator wiki
A plan has to connect to the shared database, so it needs a database login as well as AWS access. Contributors use terraform_plan, a login that can read everything a plan needs and change nothing.
This login is for terraform plan only. terraform apply is not available to contributors. Changes are applied by CI when a pull request merges.
-
Get AWS access to the incubator account (
035866691871) through your IAM user. This README does not cover it. -
Install Terraform 1.16.x.
terraform/backend.tfpins~> 1.16.0, and other versions won't initialise against the state. -
Download
terraform.tfvarsfrom theDevOps CoPvault in 1Password and save it in theterraform/directory. Terraform loads that file automatically, so there is no flag to pass and nothing to export. It is gitignored.terraform/terraform.tfvars.exampleshows what it contains. -
From
terraform/, run:terraform init -backend-config=prod.backend.tfvars terraform plan
On main, the plan should report no changes.
If you also have the master password: values in
terraform.tfvarsoverrideTF_VAR_*environment variables. With that file interraform/, Terraform connects asterraform_planeven if you have exportedTF_VAR_pgpassword. Move the file aside when you need the master login.