data-safe-haven
data-safe-haven copied to clipboard
Script that lists deployed TREs in a given SHM
:white_check_mark: Checklist
- [x] I have searched open and closed issues for duplicates.
- [x] This is a request for a new feature in the Data Safe Haven or an upgrade to an existing feature.
- [x] The feature is still missing in the latest version.
- [x] I have read through the documentation.
- [x] This isn't an open-ended question (open a discussion if it is).
:strawberry: Suggested change
It would be useful to have a tool that lists (i.e. prints to the terminal) the live TREs for a given SHM. At the moment, the only way to find this out is to log into the domain controller VM and check the security groups.
:steam_locomotive: How could this be done?
A script that can be run from a terminal window.
Could look at getting the state or outputs from pulumi and filtering it for useful information like this.
The dsh config show
command takes a required SRE name.
After you have uploaded the config, you have no local reference for the SREs that have been configured. Can we add a way to list all SRE configs?
https://github.com/alan-turing-institute/data-safe-haven/blob/458c19c681af12ba87e62fd9fda0f92edaf6e540/data_safe_haven/commands/config.py#L36-L42
After getting a list of SREs, we could for each, load the Pulumi state and give some indication of whether the SRE is deployed/exists whether the last deployment was successful or not.
Closed by #2129.