# terraform-infra

Best practices [can be found here](https://www.notion.so/Best-Practices-c22a04d9ba944afe9dc240326e5d16c7).

More general Terraform information [can be found here](https://www.notion.so/Terraform-96ac3963a3cd4b6587a1504e1e31727c).

This repository is an attempt to gather all non-module Terraform code into a single repository, with automated `plan`s and `apply`s run for each PR by Atlantis. The Devops team are currently in the process of migrating existing infrastructure-creating Terraform code from distinct repositories into this one, and all new terraform code should be created in this repo.

  The projects so far migrated are as follows, with links to the 'old' repository where applicable. Please endeavour to keep this list updated!

- [terraform-bff-notifications](https://github.com/theorchard/terraform-bff-notifications)
- [terraform-conflict-manager](https://github.com/theorchard/terraform-conflict-manager)
- [terraform-dd-search](https://github.com/theorchard/terraform-dd-search)
- terraform-frontend-gateway
- [terraform-graphql-product](https://github.com/theorchard/terraform-graphql-product)
- [terraform-integrations](https://github.com/theorchard/terraform-integrations)
- [terraform-lambda-find-assets-to-download](https://github.com/theorchard/terraform-lambda-find-assets-to-download)
- [terraform-lambda-logging-upload-audit-logs-to-s3](https://github.com/theorchard/terraform-lambda-audit-log)
- [terraform-neo4j](https://github.com/theorchard/terraform-neo4j)
- [terraform-ows-accounting](https://github.com/theorchard/terraform-ows-accounting)
- [terraform-ows-account](https://github.com/theorchard/terraform-ows-account)
- [terraform-ows-analytics](https://github.com/theorchard/terraform-ows-analytics)
- [terraform-ows-artist](https://github.com/theorchard/terraform-ows-artist)
- [terraform-ows-collaborator](https://github.com/theorchard/terraform-ows-collaborator)
- [terraform-ows-features](https://github.com/theorchard/terraform-ows-features)
- [terraform-ows-lyrics](https://github.com/theorchard/terraform-ows-lyrics)
- [terraform-ows-marketing](https://github.com/theorchard/terraform-ows-marketing)
- [terraform-ows-permissions](https://github.com/theorchard/terraform-ows-permissions)
- [terraform-ows-podcast](https://github.com/theorchard/terraform-ows-podcast)
- [terraform-ows-pypi-server](https://github.com/theorchard/terraform-ows-pypi-server)
- [terraform-ows-royalties](https://github.com/theorchard/terraform-ows-royalties)
- [terraform-ows-territories](https://github.com/theorchard/terraform-ows-territories)
- [terraform-participant](https://github.com/theorchard/terraform-participant)
- [terraform-swf-big-hit-spotify](https://github.com/theorchard/terraform-swf-feed-sender)
- [terraform-swf-monitoring](https://github.com/theorchard/terraform-swf-monitoring)

## Directory Structure

* Terraform for the Orchard prod account is split into `prod` and `qa` folders
* Terraform for the Orchard dev account can be found under `dev`
* Terraform for newer shared infrastructure accounts can be found under `<account_name>/prod`, e.g. `shared/prod` for the shared services account.
* Terraform for newer application-specific accounts can be found under `<application>/<environment>`, e.g. `permissions-platform/qa` and `permissions-platform/prod`.
