Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review apps terraform #1745

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Review apps terraform #1745

wants to merge 9 commits into from

Conversation

AP-Hunt
Copy link
Member

@AP-Hunt AP-Hunt commented Jan 31, 2025

What problem does this pull request solve?

Trello card: https://trello.com/c/u0AOLJYF/579-terraform-for-deploying-forms-admin-to-integration-ecs-cluster

Introduces a small amount of Terraform into the repository for use in deploying a forms-admin review app. Alongside the Terraform is a GitHub Actions workflow for testing and validating it.

This is a large PR, and is expected to not be the final product.

Future PRs will introduce a GitHub Actions workflow for applying the Terraform in response to new pull requests.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

@AP-Hunt AP-Hunt force-pushed the review-apps-terraform branch 7 times, most recently from ff56950 to 636738c Compare February 11, 2025 14:03
The .review_apps directory will contain Terraform code for deploying a review
copy of forms-admin. For now, it contains Terraform version cofiguration and a
small amount of documentation in README.md.
@AP-Hunt AP-Hunt force-pushed the review-apps-terraform branch 2 times, most recently from fd5384e to fdf6be0 Compare February 11, 2025 14:14
Checks Terraform style and syntax, and lints it with Checkov
PR number will be used to identify and label a number of things in the deployment.
…bucket

`integration/review` from `forms-deploy` exports a bunch of values, like subnet
ids and security groups, which will be needed by `.review_apps` to deploy to
AWS ECS.
…eview app

This a large commit, but also a logical unit.

Implements the AWS service and task definitions required to run the forms-admin
review app. The task definition runs both forms-admin and forms-api, as well as
a local postgres database for them to share. On startup, it uses the standard
rails database seeding commands to populate the database with known seed data.

The exact configuration is the result of much iteration, and subject to change
as forms-admin develops.
The forms-admin and forms-api containers don't have curl installed
…uring a deployment

Previously we had to limit the number of deployed tasks for a review app to
exactly one, because Traefik would complain about duplicate service names for
the duration of the cross over.

To avoid that, we add a timestamp to the service name, so they're always
unique.
@AP-Hunt AP-Hunt force-pushed the review-apps-terraform branch from fdf6be0 to bcee520 Compare February 11, 2025 14:24
@AP-Hunt AP-Hunt marked this pull request as ready for review February 11, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant