Skip to content

Commit 50ac9d2

Browse files
fix: Fixed test for System-Assigned Identity output (#4112)
## Description - Fixed test to work with avm-common-types - Added more tests to validate that the output exactly matches the UDT. For example - Should be a string - Should be nullable - Should not have a default value - Regenerated docs ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | [![avm.res.key-vault.vault](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml/badge.svg?branch=users%2Falsehr%2FudtTestFix&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml) [![avm.res.data-factory.factory](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.yml/badge.svg?branch=users%2Falsehr%2FudtTestFix&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.yml) ## Type of Change <!-- Use the checkboxes [x] on the options that are relevant. --> - [x] Update to CI Environment or utilities (Non-module affecting changes) - [x] Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation --------- Co-authored-by: Benjamin P. Jung <[email protected]> Co-authored-by: Benjamin P. Jung <[email protected]>
1 parent 8ad13c9 commit 50ac9d2

File tree

104 files changed

+474
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+474
-430
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.6",
3+
"version": "0.7",
44
"pathFilters": [
55
"./main.json"
66
]
7-
}
7+
}

avm/res/app/container-app/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ output resourceGroupName string = resourceGroup().name
333333
output name string = containerApp.name
334334

335335
@description('The principal ID of the system assigned identity.')
336-
output systemAssignedMIPrincipalId string = containerApp.?identity.?principalId ?? ''
336+
output systemAssignedMIPrincipalId string? = containerApp.?identity.?principalId
337337

338338
@description('The location the resource was deployed into.')
339339
output location string = containerApp.location

avm/res/app/container-app/main.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "16393853788129161391"
8+
"version": "0.33.13.18514",
9+
"templateHash": "10576304396294722473"
1010
},
1111
"name": "Container Apps",
1212
"description": "This module deploys a Container App."
@@ -1108,10 +1108,11 @@
11081108
},
11091109
"systemAssignedMIPrincipalId": {
11101110
"type": "string",
1111+
"nullable": true,
11111112
"metadata": {
11121113
"description": "The principal ID of the system assigned identity."
11131114
},
1114-
"value": "[coalesce(tryGet(tryGet(reference('containerApp', '2024-10-02-preview', 'full'), 'identity'), 'principalId'), '')]"
1115+
"value": "[tryGet(tryGet(reference('containerApp', '2024-10-02-preview', 'full'), 'identity'), 'principalId')]"
11151116
},
11161117
"location": {
11171118
"type": "string",

avm/res/app/job/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.5",
3+
"version": "0.6",
44
"pathFilters": [
55
"./main.json"
66
]

avm/res/app/managed-environment/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ output name string = managedEnvironment.name
269269
output resourceId string = managedEnvironment.id
270270

271271
@description('The principal ID of the system assigned identity.')
272-
output systemAssignedMIPrincipalId string = managedEnvironment.?identity.?principalId ?? ''
272+
output systemAssignedMIPrincipalId string? = managedEnvironment.?identity.?principalId
273273

274274
@description('The Default domain of the Managed Environment.')
275275
output defaultDomain string = managedEnvironment.properties.defaultDomain

avm/res/app/managed-environment/main.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "15540000443534992861"
8+
"version": "0.33.13.18514",
9+
"templateHash": "4503904336969657185"
1010
},
1111
"name": "App ManagedEnvironments",
1212
"description": "This module deploys an App Managed Environment (also known as a Container App Environment)."
@@ -398,7 +398,7 @@
398398
"resources": {
399399
"managedEnvironment::storage": {
400400
"copy": {
401-
"name": "storage",
401+
"name": "managedEnvironment::storage",
402402
"count": "[length(coalesce(parameters('storages'), createArray()))]"
403403
},
404404
"type": "Microsoft.App/managedEnvironments/storages",
@@ -556,10 +556,11 @@
556556
},
557557
"systemAssignedMIPrincipalId": {
558558
"type": "string",
559+
"nullable": true,
559560
"metadata": {
560561
"description": "The principal ID of the system assigned identity."
561562
},
562-
"value": "[coalesce(tryGet(tryGet(reference('managedEnvironment', '2024-02-02-preview', 'full'), 'identity'), 'principalId'), '')]"
563+
"value": "[tryGet(tryGet(reference('managedEnvironment', '2024-02-02-preview', 'full'), 'identity'), 'principalId')]"
563564
},
564565
"defaultDomain": {
565566
"type": "string",

avm/res/app/managed-environment/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.8",
3+
"version": "0.9",
44
"pathFilters": [
55
"./main.json"
66
]

avm/res/cache/redis/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ output sslPort int = redis.properties.sslPort
437437
output subnetResourceId string = !empty(subnetResourceId) ? redis.properties.subnetId : ''
438438

439439
@description('The principal ID of the system assigned identity.')
440-
output systemAssignedMIPrincipalId string = redis.?identity.?principalId ?? ''
440+
output systemAssignedMIPrincipalId string? = redis.?identity.?principalId
441441

442442
@description('The location the resource was deployed into.')
443443
output location string = redis.location

avm/res/cache/redis/main.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "17904749553568757682"
8+
"version": "0.33.13.18514",
9+
"templateHash": "6280028405930372235"
1010
},
1111
"name": "Redis Cache",
1212
"description": "This module deploys a Redis Cache."
@@ -1931,8 +1931,8 @@
19311931
"metadata": {
19321932
"_generator": {
19331933
"name": "bicep",
1934-
"version": "0.32.4.45862",
1935-
"templateHash": "395538410437204745"
1934+
"version": "0.33.13.18514",
1935+
"templateHash": "11294861621866290910"
19361936
},
19371937
"name": "Redis Cache Linked Servers",
19381938
"description": "This module connects a primary and secondary Redis Cache together for geo-replication."
@@ -2057,8 +2057,8 @@
20572057
"metadata": {
20582058
"_generator": {
20592059
"name": "bicep",
2060-
"version": "0.32.4.45862",
2061-
"templateHash": "9992767491398107530"
2060+
"version": "0.33.13.18514",
2061+
"templateHash": "14045530027687796477"
20622062
}
20632063
},
20642064
"definitions": {
@@ -2223,10 +2223,11 @@
22232223
},
22242224
"systemAssignedMIPrincipalId": {
22252225
"type": "string",
2226+
"nullable": true,
22262227
"metadata": {
22272228
"description": "The principal ID of the system assigned identity."
22282229
},
2229-
"value": "[coalesce(tryGet(tryGet(reference('redis', '2024-11-01', 'full'), 'identity'), 'principalId'), '')]"
2230+
"value": "[tryGet(tryGet(reference('redis', '2024-11-01', 'full'), 'identity'), 'principalId')]"
22302231
},
22312232
"location": {
22322233
"type": "string",

avm/res/cdn/profile/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ output endpointId string = !empty(endpointProperties) ? profile_endpoint.outputs
342342
output uri string = !empty(endpointProperties) ? profile_endpoint.outputs.uri : ''
343343

344344
@description('The principal ID of the system assigned identity.')
345-
output systemAssignedMIPrincipalId string = profile.?identity.?principalId ?? ''
345+
output systemAssignedMIPrincipalId string? = profile.?identity.?principalId
346346

347347
@description('The list of records required for custom domains validation.')
348348
output dnsValidation dnsValidationType[] = [

avm/res/cdn/profile/main.json

+28-27
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "7113649683631462027"
8+
"version": "0.33.13.18514",
9+
"templateHash": "2568064534163012915"
1010
},
1111
"name": "CDN Profiles",
1212
"description": "This module deploys a CDN Profile."
@@ -1331,8 +1331,8 @@
13311331
"metadata": {
13321332
"_generator": {
13331333
"name": "bicep",
1334-
"version": "0.32.4.45862",
1335-
"templateHash": "9549854961484064285"
1334+
"version": "0.33.13.18514",
1335+
"templateHash": "9667828946590224838"
13361336
},
13371337
"name": "CDN Profiles Endpoints",
13381338
"description": "This module deploys a CDN Profile Endpoint."
@@ -1447,8 +1447,8 @@
14471447
"metadata": {
14481448
"_generator": {
14491449
"name": "bicep",
1450-
"version": "0.32.4.45862",
1451-
"templateHash": "13720707069401173773"
1450+
"version": "0.33.13.18514",
1451+
"templateHash": "14207274905612158052"
14521452
},
14531453
"name": "CDN Profiles Endpoints Origins",
14541454
"description": "This module deploys a CDN Profile Endpoint Origin."
@@ -1692,8 +1692,8 @@
16921692
"metadata": {
16931693
"_generator": {
16941694
"name": "bicep",
1695-
"version": "0.32.4.45862",
1696-
"templateHash": "8122410068056305563"
1695+
"version": "0.33.13.18514",
1696+
"templateHash": "6185880578813937844"
16971697
},
16981698
"name": "CDN Profiles Secret",
16991699
"description": "This module deploys a CDN Profile Secret."
@@ -1841,8 +1841,8 @@
18411841
"metadata": {
18421842
"_generator": {
18431843
"name": "bicep",
1844-
"version": "0.32.4.45862",
1845-
"templateHash": "10872254821030072983"
1844+
"version": "0.33.13.18514",
1845+
"templateHash": "13058047826352389276"
18461846
},
18471847
"name": "CDN Profiles Custom Domains",
18481848
"description": "This module deploys a CDN Profile Custom Domains."
@@ -2130,8 +2130,8 @@
21302130
"metadata": {
21312131
"_generator": {
21322132
"name": "bicep",
2133-
"version": "0.32.4.45862",
2134-
"templateHash": "2255246560564651285"
2133+
"version": "0.33.13.18514",
2134+
"templateHash": "2309166106272805364"
21352135
},
21362136
"name": "CDN Profiles Origin Group",
21372137
"description": "This module deploys a CDN Profile Origin Group."
@@ -2473,8 +2473,8 @@
24732473
"metadata": {
24742474
"_generator": {
24752475
"name": "bicep",
2476-
"version": "0.32.4.45862",
2477-
"templateHash": "12548128435491978362"
2476+
"version": "0.33.13.18514",
2477+
"templateHash": "4615820934914726240"
24782478
},
24792479
"name": "CDN Profiles Origin",
24802480
"description": "This module deploys a CDN Profile Origin."
@@ -2774,8 +2774,8 @@
27742774
"metadata": {
27752775
"_generator": {
27762776
"name": "bicep",
2777-
"version": "0.32.4.45862",
2778-
"templateHash": "16187656524256202445"
2777+
"version": "0.33.13.18514",
2778+
"templateHash": "832720268679200418"
27792779
},
27802780
"name": "CDN Profiles Rule Sets",
27812781
"description": "This module deploys a CDN Profile rule set."
@@ -2932,8 +2932,8 @@
29322932
"metadata": {
29332933
"_generator": {
29342934
"name": "bicep",
2935-
"version": "0.32.4.45862",
2936-
"templateHash": "5126669469544382460"
2935+
"version": "0.33.13.18514",
2936+
"templateHash": "4778641008462766741"
29372937
},
29382938
"name": "CDN Profiles Rules",
29392939
"description": "This module deploys a CDN Profile rule."
@@ -3160,8 +3160,8 @@
31603160
"metadata": {
31613161
"_generator": {
31623162
"name": "bicep",
3163-
"version": "0.32.4.45862",
3164-
"templateHash": "13135731354374453249"
3163+
"version": "0.33.13.18514",
3164+
"templateHash": "8177824551774407436"
31653165
},
31663166
"name": "CDN Profiles AFD Endpoints",
31673167
"description": "This module deploys a CDN Profile AFD Endpoint."
@@ -3534,8 +3534,8 @@
35343534
"metadata": {
35353535
"_generator": {
35363536
"name": "bicep",
3537-
"version": "0.32.4.45862",
3538-
"templateHash": "14731142764965944373"
3537+
"version": "0.33.13.18514",
3538+
"templateHash": "5263422487313973220"
35393539
},
35403540
"name": "CDN Profiles AFD Endpoint Route",
35413541
"description": "This module deploys a CDN Profile AFD Endpoint route."
@@ -3831,7 +3831,7 @@
38313831
},
38323832
"profile::customDomains": {
38333833
"copy": {
3834-
"name": "customDomains",
3834+
"name": "profile::customDomains",
38353835
"count": "[length(coalesce(parameters('customDomainNames'), createArray()))]"
38363836
},
38373837
"existing": true,
@@ -3847,7 +3847,7 @@
38473847
},
38483848
"profile::ruleSet": {
38493849
"copy": {
3850-
"name": "ruleSet",
3850+
"name": "profile::ruleSet",
38513851
"count": "[length(parameters('ruleSets'))]"
38523852
},
38533853
"existing": true,
@@ -4013,8 +4013,8 @@
40134013
"metadata": {
40144014
"_generator": {
40154015
"name": "bicep",
4016-
"version": "0.32.4.45862",
4017-
"templateHash": "11785514765749998247"
4016+
"version": "0.33.13.18514",
4017+
"templateHash": "9521724516599685420"
40184018
},
40194019
"name": "CDN Profiles Security Policy",
40204020
"description": "This module deploys a CDN Profile Security Policy."
@@ -4197,10 +4197,11 @@
41974197
},
41984198
"systemAssignedMIPrincipalId": {
41994199
"type": "string",
4200+
"nullable": true,
42004201
"metadata": {
42014202
"description": "The principal ID of the system assigned identity."
42024203
},
4203-
"value": "[coalesce(tryGet(tryGet(reference('profile', '2023-05-01', 'full'), 'identity'), 'principalId'), '')]"
4204+
"value": "[tryGet(tryGet(reference('profile', '2023-05-01', 'full'), 'identity'), 'principalId')]"
42044205
},
42054206
"dnsValidation": {
42064207
"type": "array",

avm/res/cdn/profile/version.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.11",
3+
"version": "0.12",
44
"pathFilters": [
55
"./main.json"
66
]
7-
}
7+
}

avm/res/communication/communication-service/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ output resourceGroupName string = resourceGroup().name
184184
output location string = communicationService.location
185185

186186
@description('The principal ID of the system assigned identity.')
187-
output systemAssignedMIPrincipalId string = communicationService.?identity.?principalId ?? ''
187+
output systemAssignedMIPrincipalId string? = communicationService.?identity.?principalId
188188

189189
// ================ //
190190
// Definitions //

avm/res/communication/communication-service/main.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "605200063153991260"
8+
"version": "0.33.13.18514",
9+
"templateHash": "1289592582463975402"
1010
},
1111
"name": "Communication Services",
1212
"description": "This module deploys a Communication Service"
@@ -485,10 +485,11 @@
485485
},
486486
"systemAssignedMIPrincipalId": {
487487
"type": "string",
488+
"nullable": true,
488489
"metadata": {
489490
"description": "The principal ID of the system assigned identity."
490491
},
491-
"value": "[coalesce(tryGet(tryGet(reference('communicationService', '2023-04-01', 'full'), 'identity'), 'principalId'), '')]"
492+
"value": "[tryGet(tryGet(reference('communicationService', '2023-04-01', 'full'), 'identity'), 'principalId')]"
492493
}
493494
}
494495
}

avm/res/communication/communication-service/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.2",
3+
"version": "0.3",
44
"pathFilters": [
55
"./main.json"
66
]

avm/res/compute/disk-encryption-set/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ output name string = diskEncryptionSet.name
213213
output resourceGroupName string = resourceGroup().name
214214

215215
@description('The principal ID of the system assigned identity.')
216-
output systemAssignedMIPrincipalId string = diskEncryptionSet.?identity.?principalId ?? ''
216+
output systemAssignedMIPrincipalId string? = diskEncryptionSet.?identity.?principalId
217217

218218
@description('The idenities of the disk encryption set.')
219219
output identities object = diskEncryptionSet.identity

0 commit comments

Comments
 (0)