We currently manage one environment: Belgium.
-
Add the Terraform Cloud workspace for the new environment in the main workspace and push the changes to the
main
branch. Seetf-workspace/environments.tf
. -
Create a new Terraform workspace in this directory and push it to
main
. This workspace MUST initialise thegateway
module. You could start by copying an existing workspace. -
Go to GCB and run the trigger for the new environment. You will have to connect the GitHub repository first.
The first build might fail if the MongoDB Atlas VPC peering connection isn't ready (the connection string won't be available). If this happens:
- Go to MongoDB Atlas and wait until the peering connection is available.
- Go to Terraform Cloud and trigger another run.
- Run the GCB trigger again.
-
Configure CI by registering the new environment in
cloud-oss
. -
Configure Error Reporting notifications by going to the console and clicking "Configure Notifications". Unfortunately, we're unable to automate this.
-
Add to dependabot.yml.
-
Add to CI.
Deprovisioning isn't currently as automated as it can be, so the following manual steps are needed:
- Deactivate CI by removing the environment from
cloud-oss
. - Alter Terraform resources to allow destruction by setting the
prevent_destruction
in the module tofalse
. - Go to Terraform Cloud and destroy the workspace from the settings.
- Delete the Terraform Cloud workspace from the main workspace, by removing the respective module from
tf-workspace/environments.tf
in themain
branch. - Delete the module from the current directory.