Skip to content

Commit 25e3789

Browse files
committed
Remove auth_type from base workspace template schema
Remove auth_type field entirely from template_schema.json. The new approach makes client_id an always-visible optional top-level field - if provided, Terraform imports the existing AAD app; if empty, Terraform creates one automatically. This eliminates the deprecated API-side Graph validation that blocked workspace creation with bare app registrations. Also moves aad_redirect_uris and create_aad_groups to regular top-level properties (no longer conditional on auth_type). Fixes #2247
1 parent ec8d3a9 commit 25e3789

File tree

1 file changed

+37
-73
lines changed

1 file changed

+37
-73
lines changed

templates/workspaces/base/template_schema.json

Lines changed: 37 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"title": "Base Workspace",
66
"description": "This workspace template is the foundation for TRE workspaces.",
77
"required": [
8-
"auth_type",
98
"address_space_size"
109
],
1110
"authorizedRoles": [],
@@ -64,15 +63,10 @@
6463
"description": "Network address space to be used by the workspace.",
6564
"updateable": true
6665
},
67-
"auth_type": {
66+
"client_id": {
6867
"type": "string",
69-
"title": "Workspace Authentication Type",
70-
"description": "",
71-
"default": "Automatic",
72-
"enum": [
73-
"Automatic",
74-
"Manual"
75-
],
68+
"title": "Application (Client) ID",
69+
"description": "Optional. Provide the client ID of a pre-created AAD application. If left empty, Terraform will create a new one automatically.",
7670
"updateable": true
7771
},
7872
"create_aad_groups": {
@@ -102,6 +96,39 @@
10296
"description": "Check this box if you want to deploy the workspace to another subscription.",
10397
"default": false,
10498
"updateable": false
99+
},
100+
"aad_redirect_uris": {
101+
"type": "array",
102+
"title": "AAD Redirect URIs",
103+
"description": "Additional redirect URIs for the workspace AAD app",
104+
"updateable": true,
105+
"items": {
106+
"title": "items",
107+
"type": "object",
108+
"required": [
109+
"name",
110+
"value"
111+
],
112+
"properties": {
113+
"name": {
114+
"title": "name",
115+
"type": "string",
116+
"description": "Redirect URI Name",
117+
"examples": [
118+
"My Redirect URI"
119+
],
120+
"pattern": "^.*$"
121+
},
122+
"value": {
123+
"title": "value",
124+
"type": "string",
125+
"description": "Redirect URI Value",
126+
"examples": [
127+
"https://a-domain-name.com/oauth/"
128+
]
129+
}
130+
}
131+
}
105132
}
106133
},
107134
"allOf": [
@@ -233,68 +260,6 @@
233260
]
234261
}
235262
},
236-
{
237-
"if": {
238-
"properties": {
239-
"auth_type": {
240-
"const": "Manual"
241-
}
242-
},
243-
"required": [
244-
"auth_type"
245-
]
246-
},
247-
"then": {
248-
"properties": {
249-
"client_id": {
250-
"type": "string",
251-
"title": "Application (Client) ID",
252-
"description": "The AAD Application Registration ID for the workspace.",
253-
"updateable": true
254-
}
255-
},
256-
"required": [
257-
"client_id"
258-
]
259-
},
260-
"else": {
261-
"properties": {
262-
"aad_redirect_uris": {
263-
"type": "array",
264-
"title": "AAD Redirect URIs",
265-
"description": "Redirect URIs for the AAD app in Automatic Auth mode",
266-
"updateable": true,
267-
"items": {
268-
"title": "items",
269-
"type": "object",
270-
"required": [
271-
"name",
272-
"value"
273-
],
274-
"properties": {
275-
"name": {
276-
"title": "name",
277-
"type": "string",
278-
"description": "Redirect URI Name",
279-
"examples": [
280-
"My Redirect URI"
281-
],
282-
"pattern": "^.*$"
283-
},
284-
"value": {
285-
"title": "value",
286-
"type": "string",
287-
"description": "Redirect URI Value",
288-
"examples": [
289-
"https://a-domain-name.com/oauth/"
290-
]
291-
}
292-
}
293-
}
294-
}
295-
}
296-
}
297-
},
298263
{
299264
"if": {
300265
"properties": {
@@ -339,9 +304,8 @@
339304
"app_service_plan_sku",
340305
"address_space_size",
341306
"address_space",
342-
"auth_type",
343-
"create_aad_groups",
344307
"client_id",
308+
"create_aad_groups",
345309
"enable_backup",
346310
"enable_airlock",
347311
"configure_review_vms",

0 commit comments

Comments
 (0)