unity-sds / unity-cs

Unity Common Services
Apache License 2.0
0 stars 2 forks source link

Remove Dependency of Management Console on /unity/core/project|venue SSM param #392

Closed galenatjpl closed 5 months ago

galenatjpl commented 6 months ago

Two SSM parameters are created (/unity/core/project and /unity/core/venue) that are soon to be deprecated.
The Management Console relies on these, as opposed to the passed-in terraform project and venue variables. The variables are the information that should be used, which get written to a unity.yml file.

These lines are the correct way to get this information: https://github.com/unity-sds/unity-management-console/blob/6aeca8620bb97048af600d71de2f8b28659730be/backend/internal/processes/bootstrap.go#L227-L228

These lines are NOT the correct way: https://github.com/unity-sds/unity-management-console/blob/6aeca8620bb97048af600d71de2f8b28659730be/backend/internal/processes/bootstrap.go#L236-L245

Additionally, the Management Console UI seems to be reading from a SSM store, instead of getting the project and venue values from the unity.yaml config file.

This information is written to unity.yaml here: https://github.com/unity-sds/cfn-ps-jpl-unity-sds/blob/a0876b681675e73d749b224651865f403806e237/templates/unity-mc.main.template.yaml#L447-L454

The UI does this: https://github.com/unity-sds/unity-management-console/blob/6aeca8620bb97048af600d71de2f8b28659730be/src/routes/landing/%2Bpage.svelte#L14-L17

I'm not sure if this is the only place.

In summary, the dynamically passed venue and project information needs to be use (i.e. via the unity.yaml file), and NOT SSM.

jdrodjpl commented 5 months ago

Code was modified to pull Project/Venue information from the unity.yaml file instead of via SSM Parameters. Changes should affect both what users see in the UI as well as any Terraform actions.