-
Notifications
You must be signed in to change notification settings - Fork 2
/
azuredeploy.bicep
652 lines (607 loc) · 20.9 KB
/
azuredeploy.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
@description('The prefix will be used for every parameter that represents a resource name')
param resourceNamePrefix string = 'customer-project'
@description('The suffix will be appended to every parameter that represents a resource name')
param resourceNameSuffix string
param resourceLocation string = resourceGroup().location
@allowed([
'Developer'
'Basic'
// 'Standard' - Rather expensive
// 'Premium' - This one is really expensive
])
param apiManagementSku string = 'Developer'
param apiManagementPublisherEmail string = '[email protected]'
param apiManagementPublisherName string = 'Customer AG'
@description('Deploys Front Door setup for Developer Portal as well as some CORS-settings in the API Management')
param configureApiManagementDevPortal bool = false
param apiManagementDevPortalAadAppClientId string = ''
@secure()
param apiManagementDevPortalAadAppClientSecret string = ''
@description('The name of the SKU to use when creating the Front Door profile. If you use Private Link this must be set to `Premium_AzureFrontDoor`.')
@allowed([
'Standard_AzureFrontDoor'
'Premium_AzureFrontDoor'
])
param frontDoorSku string = 'Standard_AzureFrontDoor'
param frontDoorSpnObjectId string = '00000000-0000-0000-0000-000000000000' // Created according to https://docs.microsoft.com/en-gb/azure/frontdoor/standard-premium/how-to-configure-https-custom-domain#register-azure-front-door and copy ObjectId (to be done once per tenant)
param customDomainApimApi string = 'int.api.customer.ch'
param customDomainApimPortal string = 'portal.api.customer.ch'
@description('If set to false, it deploys the KeyVault as fresh new instance including removal of all other access policies. If set to true, the KeyVault needs to be existing, otherwise an error is thrown.')
param useExistingKeyVault bool = true
var logAnalyticsWsName = '${resourceNamePrefix}-law-${resourceNameSuffix}'
var appInsightsName = '${resourceNamePrefix}-ai-${resourceNameSuffix}'
// Key Vault is mainly deployed for later provisioning of custom SSL certificates
var keyVaultName = '${resourceNamePrefix}-kv-${resourceNameSuffix}'
var keyVaultMgmtPermissions = {
secrets: [
'get'
'list'
]
certificates: [
'get'
'getissuers'
'list'
'listissuers'
]
}
var apiMgmtName = '${resourceNamePrefix}-apim-${resourceNameSuffix}'
var apiMgmtFrontDoorIdNamedValueName = 'FrontDoorId'
var frontDoorName = '${resourceNamePrefix}-fd-${resourceNameSuffix}'
var frontDoorApiEndpoint = '${resourceNamePrefix}-fd-api-${resourceNameSuffix}'
var frontDoorDevPortalEndpoint = '${resourceNamePrefix}-fd-portal-${resourceNameSuffix}'
var frontDoorWafName = replace('${resourceNamePrefix}-fd-waf-${resourceNameSuffix}', '-', '')
resource partnerIdRes 'Microsoft.Resources/deployments@2020-06-01' = {
name: 'pid-d16e7b59-716a-407d-96db-18d1cac40407'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}
resource logAnalyticsWsRes 'Microsoft.OperationalInsights/workspaces@2020-08-01' = {
name: logAnalyticsWsName
location: resourceLocation
properties: {
sku: {
name: 'PerGB2018'
}
retentionInDays: 30
}
}
resource appInsightsRes 'Microsoft.Insights/components@2020-02-02' = {
name: appInsightsName
location: resourceLocation
kind: 'web'
properties: {
Application_Type: 'web'
WorkspaceResourceId: logAnalyticsWsRes.id
}
}
resource keyVaultRes 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: keyVaultName
location: resourceLocation
properties: {
sku: {
family: 'A'
name: 'standard'
}
tenantId: subscription().tenantId
enabledForTemplateDeployment: true
enableRbacAuthorization: false
enableSoftDelete: true // With default of softDeleteRetentionInDays = 90
createMode: useExistingKeyVault ? 'recover' : 'default'
accessPolicies: []
}
}
resource keyVaultDiagnosticsRes 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = {
name: 'LogAnalytics'
scope: keyVaultRes
properties: {
workspaceId: logAnalyticsWsRes.id
logs: [
{
category: 'AuditEvent'
enabled: true
}
]
metrics: [
{
category: 'AllMetrics'
enabled: true
}
]
}
}
resource keyVaultAccessPoliciesRes 'Microsoft.KeyVault/vaults/accessPolicies@2022-07-01' = {
parent: keyVaultRes
name: 'add'
properties: {
accessPolicies: [
{
tenantId: subscription().tenantId
objectId: reference(apiMgmtRes.id, '2021-08-01', 'Full').identity.principalId
permissions: keyVaultMgmtPermissions
}
{
tenantId: subscription().tenantId
objectId: frontDoorSpnObjectId
permissions: frontDoorSpnObjectId != '' ? keyVaultMgmtPermissions : {}
}
]
}
}
resource apiMgmtRes 'Microsoft.ApiManagement/service@2021-08-01' = {
name: apiMgmtName
location: resourceLocation
sku: {
name: apiManagementSku
capacity: apiManagementSku == 'Consumption' ? 0 : 1
}
properties: {
publisherEmail: apiManagementPublisherEmail
publisherName: apiManagementPublisherName
}
identity: {
type: 'SystemAssigned'
}
}
resource apiMgmtServiceLoggerRes 'Microsoft.ApiManagement/service/loggers@2021-08-01' = {
parent: apiMgmtRes
name: appInsightsName
properties: {
loggerType: 'applicationInsights'
credentials: {
instrumentationKey: appInsightsRes.properties.InstrumentationKey // Despite migrated to connection-string in other places, this is still documented to require the key - but may change in future
}
isBuffered: true
resourceId: appInsightsRes.id
}
}
resource apiMgmtServiceDiagnosticsRes 'Microsoft.ApiManagement/service/diagnostics@2021-08-01' = {
parent: apiMgmtRes
name: 'applicationinsights'
properties: {
alwaysLog: 'allErrors'
loggerId: apiMgmtServiceLoggerRes.id
sampling: {
samplingType: 'fixed'
percentage: 100
}
}
}
resource apiMgmtDiagnosticsRes 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = {
name: 'LogAnalytics'
scope: apiMgmtRes
properties: {
workspaceId: logAnalyticsWsRes.id
logs: [
{
category: 'GatewayLogs'
enabled: true
}
]
metrics: [
{
category: 'AllMetrics'
enabled: true
}
]
}
}
resource apiMgmtIdentityProviderAadRes 'Microsoft.ApiManagement/service/identityProviders@2021-08-01' = if (configureApiManagementDevPortal && apiManagementDevPortalAadAppClientId != '') {
parent: apiMgmtRes
name: 'aad' // Alternative 'aadB2C'
properties: {
type: 'aad' // Alternative 'aadB2C'
clientId: apiManagementDevPortalAadAppClientId
clientSecret: apiManagementDevPortalAadAppClientSecret
authority: environment().authentication.loginEndpoint // 'login.microsoftonline.com'
signinTenant: subscription().tenantId
allowedTenants: [
subscription().tenantId
]
}
}
resource apiMgmtNamedValueFrontDoorRes 'Microsoft.ApiManagement/service/namedValues@2021-08-01' = {
parent: apiMgmtRes
name: apiMgmtFrontDoorIdNamedValueName
properties: {
displayName: apiMgmtFrontDoorIdNamedValueName
value: frontDoorRes.properties.frontDoorId
secret: true
}
}
// Officially, the Developer Portal only supports APIM being behind a Front Door, with a custom domain (type proxy/gateway) linked by both services.
// That solution is only possible with custom SSL certificate provisioning, which is incredible painful to be automated (and btw the Developer SKU doesn't support the Key Vault based autorenew).
// This hacky solution provides basically a redirection of API traffic caused within built-in Test view and Developer Portal to be routed via Front Door. And it handles CORS issues.
// For non-OPTIONS requests, basically a common HTTP redirection is made. As 301 turns everything into GET, we would need the 308 code (permanent) - but this is currently not supported in the built-in Test view, so we use a 307 (temporary) which also maintains HTTP methods
// Further this policy validates that traffic comes from the Front Door only (again, only for non OPTIONS requests)
resource apiMgmtBasePolicyRes 'Microsoft.ApiManagement/service/policies@2021-08-01' = {
parent: apiMgmtRes
name: 'policy'
properties: {
value: configureApiManagementDevPortal ? '<policies><inbound><cors allow-credentials="true" terminate-unmatched-request="false"><allowed-origins><origin>${apiMgmtRes.properties.developerPortalUrl}</origin><origin>https://${frontDoorEndpointDevPortalRes.properties.hostName}</origin><origin>https://${customDomainApimPortal}</origin></allowed-origins><allowed-methods preflight-result-max-age="300"><method>*</method></allowed-methods><allowed-headers><header>*</header></allowed-headers><expose-headers><header>*</header></expose-headers></cors><choose><when condition="@(context.Request.Method == "OPTIONS")" /><when condition="@(context.Request.Headers.GetValueOrDefault("X-Azure-FDID","") == "")"><return-response><set-status code="307" reason="Redirecting" /><set-header name="Location" exists-action="override"><value>@("https://${frontDoorEndpointApiRes.properties.hostName}" + context.Request.OriginalUrl.Path + context.Request.OriginalUrl.QueryString)</value></set-header></return-response></when><otherwise><check-header name="X-Azure-FDID" failed-check-httpcode="403" failed-check-error-message="Invalid request." ignore-case="false"><value>{{FrontDoorId}}</value></check-header></otherwise></choose></inbound><backend><forward-request /></backend></policies>' : '<policies><inbound><check-header name="X-Azure-FDID" failed-check-httpcode="403" failed-check-error-message="Invalid request." ignore-case="false"><value>{{${apiMgmtFrontDoorIdNamedValueName}}}</value></check-header></inbound><backend><forward-request /></backend></policies>'
format: 'xml'
}
dependsOn: [
apiMgmtNamedValueFrontDoorRes
]
}
resource frontDoorRes 'Microsoft.Cdn/profiles@2021-06-01' = {
name: frontDoorName
location: 'global'
sku: {
name: frontDoorSku
}
}
resource frontDoorEndpointApiRes 'Microsoft.Cdn/profiles/afdEndpoints@2021-06-01' = {
name: frontDoorApiEndpoint
parent: frontDoorRes
location: 'global'
properties: {
enabledState: 'Enabled'
}
}
resource frontDoorOriginGroupApiRes 'Microsoft.Cdn/profiles/originGroups@2021-06-01' = {
name: 'api'
parent: frontDoorRes
properties: {
loadBalancingSettings: {
sampleSize: 4
successfulSamplesRequired: 3
}
healthProbeSettings: {
probePath: '/'
probeRequestType: 'HEAD'
probeProtocol: 'Http'
probeIntervalInSeconds: 100
}
sessionAffinityState: 'Disabled'
}
}
resource frontDoorOriginApiRes 'Microsoft.Cdn/profiles/originGroups/origins@2021-06-01' = {
name: 'ApiManagement'
parent: frontDoorOriginGroupApiRes
properties: {
hostName: apiMgmtRes.properties.hostnameConfigurations[0].hostName
httpPort: 80
httpsPort: 443
originHostHeader: apiMgmtRes.properties.hostnameConfigurations[0].hostName
priority: 1
weight: 1000
}
}
resource frontDoorDomainApiRes 'Microsoft.Cdn/profiles/customdomains@2021-06-01' = if (!empty(customDomainApimApi)) {
name: replace(customDomainApimApi, '.', '-')
parent: frontDoorRes
properties: {
hostName: customDomainApimApi
tlsSettings: {
certificateType: 'ManagedCertificate'
minimumTlsVersion: 'TLS12'
}
}
}
resource frontDoorEndpointRouteApiRes 'Microsoft.Cdn/profiles/afdEndpoints/routes@2021-06-01' = {
name: 'api-route'
parent: frontDoorEndpointApiRes
dependsOn: [
frontDoorOriginApiRes // This explicit dependency is required to ensure that the origin group is not empty when the route is created.
]
properties: {
customDomains: [
{
id: frontDoorDomainApiRes.id
}
]
originGroup: {
id: frontDoorOriginGroupApiRes.id
}
ruleSets: !configureApiManagementDevPortal ? [] : [
{
id: frontDoorRulesetDevPortalRes.id
}
]
supportedProtocols: [
'Http'
'Https'
]
patternsToMatch: [
'/*'
]
forwardingProtocol: 'HttpsOnly'
linkToDefaultDomain: 'Enabled'
httpsRedirect: 'Enabled'
enabledState: 'Enabled'
}
}
resource frontDoorRulesetDevPortalRes 'Microsoft.Cdn/profiles/rulesets@2021-06-01' = if(configureApiManagementDevPortal) {
name: 'apimDevPortal'
parent: frontDoorRes
}
// API Management Developer Portal completely fails to make CORS-proper calls when receiving a 3xx redirection - these rules fixes it by transforming request and response headers
// Info: The conditional references inside this resource are necessary because of this Bicep/ARM bug: https://github.com/Azure/bicep/issues/3990
resource frontDoorRulesetDevPortalDefaultHostCorsRuleRes 'Microsoft.Cdn/profiles/rulesets/rules@2021-06-01' = if(configureApiManagementDevPortal) {
name: 'DefaultHostCors'
parent: frontDoorRulesetDevPortalRes
properties: {
order: 1
conditions: [
{
name: 'RequestHeader'
parameters: {
typeName: 'DeliveryRuleRequestHeaderConditionParameters'
operator: 'BeginsWith'
selector: 'Referer'
negateCondition: false
matchValues: [
configureApiManagementDevPortal ? 'https://${frontDoorEndpointDevPortalRes.properties.hostName}' : ''
]
transforms: [
'Lowercase'
'Trim'
]
}
}
{
name: 'RequestHeader'
parameters: {
typeName: 'DeliveryRuleRequestHeaderConditionParameters'
operator: 'Equal'
selector: 'Origin'
negateCondition: false
matchValues: [
'null'
]
transforms: [
'Lowercase'
'Trim'
]
}
}
]
actions: [
{
name: 'ModifyRequestHeader'
parameters: {
typeName: 'DeliveryRuleHeaderActionParameters'
headerAction: 'Overwrite'
headerName: 'Origin'
value: configureApiManagementDevPortal ? 'https://${frontDoorEndpointDevPortalRes.properties.hostName}' : ''
}
}
{
name: 'ModifyResponseHeader'
parameters: {
typeName: 'DeliveryRuleHeaderActionParameters'
headerAction: 'Overwrite'
headerName: 'Access-Control-Allow-Origin'
value: 'null'
}
}
]
matchProcessingBehavior: 'Continue'
}
}
resource frontDoorRulesetDevPortalCustomDomainCorsRuleRes 'Microsoft.Cdn/profiles/rulesets/rules@2021-06-01' = if(configureApiManagementDevPortal && !empty(customDomainApimPortal)) {
name: 'CustomDomainCors'
parent: frontDoorRulesetDevPortalRes
properties: {
order: 2
conditions: [
{
name: 'RequestHeader'
parameters: {
typeName: 'DeliveryRuleRequestHeaderConditionParameters'
operator: 'BeginsWith'
selector: 'Referer'
negateCondition: false
matchValues: [
'https://${customDomainApimPortal}'
]
transforms: [
'Lowercase'
'Trim'
]
}
}
{
name: 'RequestHeader'
parameters: {
typeName: 'DeliveryRuleRequestHeaderConditionParameters'
operator: 'Equal'
selector: 'Origin'
negateCondition: false
matchValues: [
'null'
]
transforms: [
'Lowercase'
'Trim'
]
}
}
]
actions: [
{
name: 'ModifyRequestHeader'
parameters: {
typeName: 'DeliveryRuleHeaderActionParameters'
headerAction: 'Overwrite'
headerName: 'Origin'
value: 'https://${customDomainApimPortal}'
}
}
{
name: 'ModifyResponseHeader'
parameters: {
typeName: 'DeliveryRuleHeaderActionParameters'
headerAction: 'Overwrite'
headerName: 'Access-Control-Allow-Origin'
value: 'null'
}
}
]
matchProcessingBehavior: 'Continue'
}
}
resource frontDoorEndpointDevPortalRes 'Microsoft.Cdn/profiles/afdEndpoints@2021-06-01' = if(configureApiManagementDevPortal) {
name: frontDoorDevPortalEndpoint
parent: frontDoorRes
location: 'global'
properties: {
enabledState: 'Enabled'
}
}
resource frontDoorOriginGroupDevPortalRes 'Microsoft.Cdn/profiles/originGroups@2021-06-01' = if(configureApiManagementDevPortal) {
name: 'developer-portal'
parent: frontDoorRes
properties: {
loadBalancingSettings: {
sampleSize: 4
successfulSamplesRequired: 3
}
healthProbeSettings: {
probePath: '/'
probeRequestType: 'HEAD'
probeProtocol: 'Http'
probeIntervalInSeconds: 100
}
sessionAffinityState: 'Disabled'
}
}
resource frontDoorOriginDevPortalRes 'Microsoft.Cdn/profiles/originGroups/origins@2021-06-01' = if(configureApiManagementDevPortal) {
name: 'DeveloperPortal'
parent: frontDoorOriginGroupDevPortalRes
properties: {
hostName: replace(apiMgmtRes.properties.developerPortalUrl, 'https://', '')
httpPort: 80
httpsPort: 443
originHostHeader: replace(apiMgmtRes.properties.developerPortalUrl, 'https://', '')
priority: 1
weight: 1000
}
}
resource frontDoorDomainDevPortalRes 'Microsoft.Cdn/profiles/customdomains@2021-06-01' = if(configureApiManagementDevPortal && !empty(customDomainApimPortal)) {
name: replace(customDomainApimPortal, '.', '-')
parent: frontDoorRes
properties: {
hostName: customDomainApimPortal
tlsSettings: {
certificateType: 'ManagedCertificate'
minimumTlsVersion: 'TLS12'
}
}
}
resource frontDoorEndpointRouteDevPortalRes 'Microsoft.Cdn/profiles/afdEndpoints/routes@2021-06-01' = if(configureApiManagementDevPortal) {
name: 'developer-portal-route'
parent: frontDoorEndpointDevPortalRes
dependsOn: [
frontDoorOriginDevPortalRes // This explicit dependency is required to ensure that the origin group is not empty when the route is created.
]
properties: {
customDomains: [
{
id: frontDoorDomainDevPortalRes.id
}
]
originGroup: {
id: frontDoorOriginGroupDevPortalRes.id
}
supportedProtocols: [
'Http'
'Https'
]
patternsToMatch: [
'/*'
]
forwardingProtocol: 'HttpsOnly'
linkToDefaultDomain: 'Enabled'
httpsRedirect: 'Enabled'
enabledState: 'Enabled'
}
}
resource frontDoorWafRes 'Microsoft.Network/FrontDoorWebApplicationFirewallPolicies@2020-11-01' = {
name: frontDoorWafName
location: 'global'
sku: {
name: frontDoorSku
}
properties: {
policySettings: {
enabledState: 'Enabled'
mode: 'Detection'
}
managedRules: {
managedRuleSets: []
}
}
}
resource frontDoorWafPolicyRes 'Microsoft.Cdn/profiles/securityPolicies@2021-06-01' = {
name: 'waf-policy'
parent: frontDoorRes
properties: {
parameters: {
type: 'WebApplicationFirewall'
wafPolicy: {
id: frontDoorWafRes.id
}
associations: [
{
domains: union(!configureApiManagementDevPortal ? [] : [
{
id: frontDoorEndpointDevPortalRes.id
}
], [
{
id: frontDoorEndpointApiRes.id
}
])
patternsToMatch: [
'/*'
]
}
]
}
}
}
resource frontDoorDiagnosticsRes 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = {
name: 'LogAnalytics'
scope: frontDoorRes
properties: {
workspaceId: logAnalyticsWsRes.id
logs: [
{
category: 'FrontDoorAccessLog'
enabled: true
}
{
category: 'FrontDoorHealthProbeLog'
enabled: true
}
{
category: 'FrontDoorWebApplicationFirewallLog'
enabled: true
}
]
metrics: [
{
category: 'AllMetrics'
enabled: true
}
]
}
}
output keyVaultName string = keyVaultRes.id
output apiManagementId string = apiMgmtRes.id
output frontDoorApiEndpointHostName string = frontDoorEndpointApiRes.properties.hostName
output frontDoorApiDnsTxtRecordName string = '_dnsauth.${frontDoorDomainApiRes.properties.hostName}'
output frontDoorApiDnsTxtRecordValue string = frontDoorDomainApiRes.properties.validationProperties.validationToken
output frontDoorApiDnsExpiry string = frontDoorDomainApiRes.properties.validationProperties.expirationDate
output frontDoorDeveloperPortalEndpointHostName string = configureApiManagementDevPortal ? frontDoorEndpointDevPortalRes.properties.hostName : ''
output frontDoorDeveloperPortalDnsTxtRecordName string = configureApiManagementDevPortal ? '_dnsauth.${frontDoorDomainDevPortalRes.properties.hostName}' : ''
output frontDoorDeveloperPortalDnsTxtRecordValue string = configureApiManagementDevPortal ? frontDoorDomainDevPortalRes.properties.validationProperties.validationToken : ''
output frontDoorDeveloperPortalDnsExpiry string = configureApiManagementDevPortal ? frontDoorDomainDevPortalRes.properties.validationProperties.expirationDate : ''