Repository: microsoft/AzureTRE

Issue:
Standardize TRE identifiers
## Description

As a TRE developer
I want naming of identifiers to be simple and standardized across the TRE
So it will as intuitive as possible

Currently we have Core ID, TRE ID and resource_name_prefix, which all are unique IDs for a TRE instance. ([Ref to code](https://github.com/microsoft/AzureTRE/blob/3cc8e14c6a16d5bb940f259dd5cb257e735e448b/templates/core/terraform/main.tf#L17))
They are used to ensure no clashes between names, but having a single identifier is sufficient.

### A simplified solution

When creating a TRE instance, a unique identifier is needed, to make sure no clashes occur. That identifier should be named TRE_ID and can be up to 10 chars long (Alphanumeric, underscore, and hyphen). If the Cloud Administrator wants to use a specific naming convention e.g. one that includes environment, the Cloud Administrator can do so.

Examples of a TRE_ID:

- mytre
- msfttre-dev
- tre123

Hench the TRE_ID is an unique identifier for the TRE instance replacing the Core ID, which consisted of TRE ID + resource_name_prefix.

## Acceptance criteria

- [x] TRE provisioning script uses the TRE ID as the TRE instance name, hence creates the cross-cutting services in a ressource group with the name of TRE ID e.g. mytre
- [x] TRE provisioning script does not require environment parameter
- [x] Workspace bundle uses TRE_ID (not Core ID as now) as the identifier for the TRE instance



Discussion:

Resolving patch:
diff --git a/management_api_app/core/config.py b/management_api_app/core/config.py
--- a/management_api_app/core/config.py
+++ b/management_api_app/core/config.py
@@ -11,7 +11,7 @@
 
 # Resource Info
 RESOURCE_LOCATION: str = config("RESOURCE_LOCATION", default="")
-CORE_ID: str = config("CORE_ID", default="")
+TRE_ID: str = config("TRE_ID", default="")
 
 # State store configuration
 STATE_STORE_ENDPOINT: str = config("STATE_STORE_ENDPOINT", default="")      # Cosmos DB endpoint
diff --git a/management_api_app/db/repositories/workspaces.py b/management_api_app/db/repositories/workspaces.py
--- a/management_api_app/db/repositories/workspaces.py
+++ b/management_api_app/db/repositories/workspaces.py
@@ -39,7 +39,7 @@ def create_workspace(self, workspace_create: WorkspaceInCreate) -> Workspace:
         resource_spec_parameters = {
             "location": config.RESOURCE_LOCATION,
             "workspace_id": "0001",         # TODO: Calculate this value - Issue #166
-            "core_id": config.CORE_ID,
+            "tre_id": config.TRE_ID,
             "address_space": "10.2.1.0/24"  # TODO: Calculate this value - Issue #52
         }
 
diff --git a/management_api_app/models/schemas/workspace.py b/management_api_app/models/schemas/workspace.py
--- a/management_api_app/models/schemas/workspace.py
+++ b/management_api_app/models/schemas/workspace.py
@@ -14,7 +14,7 @@ def get_sample_workspace(workspace_id: str, spec_workspace_id: str = "0001") ->
         "resourceSpecParameters": {
             "location": "westeurope",
             "workspace_id": spec_workspace_id,
-            "core_id": "mytre-dev-1234",
+            "tre_id": "mytre-dev-1234",
             "address_space": "10.2.1.0/24"
         },
         "status": "not_deployed",


Test patch: