modernisation-platform
modernisation-platform copied to clipboard
Automate creation of application.json file for Account Creation
User Story
As a MP Engineer I want to automate the creation of the application.json file for account creation So that I can further reduce the manual steps required to onboard members
Value / Purpose
https://user-guide.modernisation-platform.service.justice.gov.uk/runbooks/creating-accounts-for-end-users.html#creating-aws-accounts-for-teams defines the runbook for onboarding new accounts.
This story would aim to automate creation of the first PR required which includes steps:
1. Create a new environment file
2. Update the expected.rego
NB - We could make this a manually triggered job so that PRs are not created for requests which turn out to be rejected as they are not suitable to be hosted in MP etc.
The purpose of the story would be to parse the information from the issue template that members raise to request an environment and automatically compile the application.json file using details supplied in the form. Currently engineers create a new file using this template and raise a PR.
It would need to account for the possibility of existing applications adding new environments (hence no new application.json file required just and update to the existing). It may also require a change to the issue form we use to gather the data (to make it easier to parse).
Overall this would reduce the time/steps required to onboard member accounts.
Useful Contacts
@richgreen-moj
Additional Information
There are some non-verified actions that parse github issues and transform to json here that could provide some inspiration. Perhaps there other ways this could be achieved though? Unfortunately I don't think GitHub has native ability to export the various fields in a template issue form into a queryable json format.
Proposal / Unknowns
For the demand of new accounts the effort here might outweigh the benefit but it could be a fun project!
Definition of Done
- [ ] New environment issue template has been updated (if required to aid the automation)
- [ ] A new github action (or agreed solution) has been created which can be manually triggered by a member of MP to generate the environment json file and updates the expected rego file etc.
- [ ] The automation accounts for adding additional environments to existing applications
- [ ] Documentation has been updated
- [ ] Another team member has reviewed
- [ ] Tests are green