Creating Components for Member Applications
Overview
This guide explains how to create components for member applications in the modernisation-platform-environments repository. It covers updating configuration files, running workflows, and managing pull requests to set up new components.
Requirements
A component can only be created for an existing account. Ensure the following prerequisites are met:
- A corresponding
<application>.jsonfile exists in themodernisation-platformrepository. - The folder structure exists under
terraform/environments/<application>in the modernisation-platform-environments repository.
Create a New Component
1. Update the <application>.json File
Add the new components under the components field.
Example:
{
"account-type": "member",
"components": [
{
"name": "playground",
"sso_group_name": "modernisation-platform"
},
{
"name": "testbed"
}
]
}
- In this example two folders
playgroundandtestbedwill be created interraform/environments/sprinklerin themodernisation-platform-environmentsrepo. - The
sso_group_namefield is optional. If provided, the corresponding folder (e.g.,terraform/environments/sprinkler/playground) will be added to theCODEOWNERSfile, allowing the specified team to approve GitHub Action runs.
2. Create a Pull Request
Submit a pull request for the changes made in Step 1.
-
This will trigger the
new-environment workflowto provision workspaces. -
This will also run
new-member-environment-files workflowwhich generates two new pull requests:- Component Files Creation: Adds component files in the
modernisation-platform-environmentsrepository. - Dependabot Configuration (Optional): Updates CODEOWNERS file in the
modernisation-platform-environmentsrepository ifsso_group_nameis specified.
- Component Files Creation: Adds component files in the
-
See #9530 and #9532 for examples of the autogenerated PRs by the above workflows.
3. Merge the Pull Requests
Merge the pull requests generated by the workflows:
- Component Files PR: Required. (step 2.1)
- Dependabot Configuration PR: Optional (only exists if
sso_group_nameis provided). (step 2.2)
Was this page useful?