Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.25 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.25 KB

Deploying common-app-api

In general, you should use GitHub Actions to actually deploy, instead of deploying locally. The local instructions are provided primarily to aid in testing plans during dev and for troubleshooting.

Overview

The tf folder is divided into envs and modules (none yet).

Each environment has a folder in envs. For example, the dev folder houses code for the dev environment.

Local setup

AWS Setup

First set up an AWS SSO profile for the FAN Apps account using:

aws configure sso --profile fan-apps-admin

Then, once per session, you'll run the following to login and cache credentials:

aws sso login --profile fan-apps-admin

Working in environments

The first time you work in an environment, you'll need to init:

cd tf/envs/dev # or whatever env
terraform init

To run terraform commands such as plan and apply, set the AWS profile:

AWS_PROFILE=fan-apps-admin terraform plan

Secrets / Variables

The terraform configuration makes use of the following environment variables:

TF_API_TOKEN - Team wide API token used to authenticate against Terraform Cloud when applying a new Terraform config

<ENV>_AWS_PLAN_ROLE - ARN for the AWS github-actions-infra role