Skip to content

Infrastructure configuration for the Illinois GetChildCare backend.

License

Notifications You must be signed in to change notification settings

codeforamerica/il-gcc-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Illinois GetChildCare Infrastructure

Infrastructure configuration for the Illinois GetChildCare backend.

Requirements

The configurations are written in HCL and support both OpenTofu and the equivalent version of Terraform.

Usage

Local

To run the configurations locally, you will need to have AWS credentials loaded from Identity Center, and installed OpenTofu.

Navigate to the configuration you would like to plan or apply. Copy the sample.env file to .env, and set the appropriate values. Make sure this file is loaded into your environment. This can be done automatically through various shell tools (such as [Oh My Zsh][omz]), or manually by running source .env.

With the environment variables loaded, run the plan command to see what changes will be made:

cd tofu/config/staging # Replace with the appropriate configuration
tofu init
tofu plan -out tfplan.out

Review the plan output. If the changes are acceptable, apply the changes:

tofu apply tfplan.out

GitHub Actions

You can also run the configurations using GitHub Actions. There are two workflows that can be called manually: plan.yaml and deploy.yaml. These workflows can be run directly from GitHub by following their links.

Additionally, these workflows can be triggered using the GitHub CLI (where config is the name of a directory under tofu/config/):

gh workflow run <workflow>.yaml -f environment=staging -f config=staging

You can then run gh workflow list --workflow plan.yaml to see the status of the execution and get its id. With this id, you can watch the run and get the logs:

gh run watch <run-id>
gh run view <run-id> --log

To run the workflow for a branch other than main, you can pass the --ref <branch-name> flag.

About

Infrastructure configuration for the Illinois GetChildCare backend.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages