Working in Modernisation Platform
The Analytical Platform makes use of the Modernisation Platform as a hosting solution for some of its services (e.g. analytical-platform-ingestion). As such, it is important to understand how to develop solutions effectively in this context.
Running Terraform in Modernisation Platform
In this case we will use the analytical-platform-ingestion environment.
Clone the modernisation-platform-environments repository and open it in Visual Studio Code.
Start the Dev Container.
Cmd + Shift + P
->Dev Containers: Reopen in Container
Navigate to the environment you are operating in -
cd terraform/environments/analytical-platform-ingestion
.To run a
terraform init
+terraform plan
run the following command:$ bash /workspaces/modernisation-platform-environments/scripts/member-local-plan.sh Account: analytical-platform-ingestion Stage: development Role: modernisation-platform-sandbox Verify this code in your browser: ABCD-EFGH Please open the following URL in your browser: https://device.sso.eu-west-2.amazonaws.com/?user_code=ABCD-EFGH
Click on the link provided and authorise AWS in the browser. Return to your terminal.
You can now run this command repeatedly with a fast feedback loop to understand the changes you are making in Terraform.
Common Errors
If you run the member-local-plan.sh
script and produce the error:
FATAL Error running command: Invalid --profile analytical-platform-ingestion-development:modernisation-platform-developer
Then you need to use the -r
flag in the member-local-plan.sh
script:
$ bash /workspaces/modernisation-platform-environments/scripts/member-local-plan.sh -r modernisation-platform-sandbox
Modernisation Platform Environments repository has a different deployment process from the main Analytical Platform repository. You need to grant explicit approval for deployment to all environments.
Remember: Just because you merged it, doesn’t mean you deployed it!