data-safe-haven icon indicating copy to clipboard operation
data-safe-haven copied to clipboard

Script that lists deployed TREs in a given SHM

Open dsj976 opened this issue 10 months ago • 2 comments

: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.

dsj976 avatar Apr 16 '24 08:04 dsj976

Could look at getting the state or outputs from pulumi and filtering it for useful information like this.

JimMadge avatar May 17 '24 14:05 JimMadge

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

JimMadge avatar Jun 28 '24 14:06 JimMadge

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.

JimMadge avatar Aug 13 '24 13:08 JimMadge

Closed by #2129.

jemrobinson avatar Aug 28 '24 11:08 jemrobinson