Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modules] Removed excess s from MI UDT definition #4243

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/api-management/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = {
}
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
Expand Down Expand Up @@ -381,7 +381,7 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = {
"managedIdentities": {
"value": {
"systemAssigned": true,
"userAssignedResourcesIds": [
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
Expand Down Expand Up @@ -564,7 +564,7 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = {
}
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
Expand Down Expand Up @@ -751,7 +751,7 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = {
"managedIdentities": {
"value": {
"systemAssigned": true,
"userAssignedResourcesIds": [
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
Expand Down Expand Up @@ -1141,7 +1141,7 @@ The managed identity definition for this resource.
| Name | Required | Type | Description |
| :-- | :-- | :--| :-- |
| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | No | bool | Optional. Enables system assigned managed identity on the resource. |
| [`userAssignedResourcesIds`](#parameter-managedidentitiesuserassignedresourcesids) | No | array | Optional. The resource ID(s) to assign to the resource. |
| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | No | array | Optional. The resource ID(s) to assign to the resource. |

### Parameter: `managedIdentities.systemAssigned`

Expand All @@ -1150,7 +1150,7 @@ Optional. Enables system assigned managed identity on the resource.
- Required: No
- Type: bool

### Parameter: `managedIdentities.userAssignedResourcesIds`
### Parameter: `managedIdentities.userAssignedResourceIds`

Optional. The resource ID(s) to assign to the resource.

Expand Down
6 changes: 3 additions & 3 deletions modules/api-management/service/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ var enableReferencedModulesTelemetry = false

var authorizationServerList = !empty(authorizationServers) ? authorizationServers.secureList : []

var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourcesIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }

var identity = !empty(managedIdentities) ? {
type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourcesIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourcesIds ?? {}) ? 'UserAssigned' : null)
type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
} : null

Expand Down Expand Up @@ -465,7 +465,7 @@ type managedIdentitiesType = {
systemAssigned: bool?

@description('Optional. The resource ID(s) to assign to the resource.')
userAssignedResourcesIds: string[]?
userAssignedResourceIds: string[]?
}?

type lockType = {
Expand Down
66 changes: 33 additions & 33 deletions modules/api-management/service/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "10340171795894114862"
"version": "0.23.1.45101",
"templateHash": "12034021056308380039"
},
"name": "API Management Services",
"description": "This module deploys an API Management Service.",
Expand All @@ -23,7 +23,7 @@
"description": "Optional. Enables system assigned managed identity on the resource."
}
},
"userAssignedResourcesIds": {
"userAssignedResourceIds": {
"type": "array",
"items": {
"type": "string"
Expand Down Expand Up @@ -501,8 +501,8 @@
"variables": {
"enableReferencedModulesTelemetry": false,
"authorizationServerList": "[if(not(empty(parameters('authorizationServers'))), parameters('authorizationServers').secureList, createArray())]",
"formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourcesIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
"identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourcesIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourcesIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
"formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
"identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
"builtInRoleNames": {
"API Management Developer Portal Content Editor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c031e6a8-4391-4de0-8d69-4706a7ed3729')]",
"API Management Service Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '312a565d-c81f-4fd8-895a-4e21e48d571c')]",
Expand Down Expand Up @@ -672,8 +672,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "17340528539230351720"
"version": "0.23.1.45101",
"templateHash": "11512052528068634292"
},
"name": "API Management Service APIs",
"description": "This module deploys an API Management Service API.",
Expand Down Expand Up @@ -952,8 +952,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "14571499926134179860"
"version": "0.23.1.45101",
"templateHash": "17230254380289042348"
},
"name": "API Management Service APIs Policies",
"description": "This module deploys an API Management Service API Policy.",
Expand Down Expand Up @@ -1122,8 +1122,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "12233980723609740158"
"version": "0.23.1.45101",
"templateHash": "16962621369738378491"
},
"name": "API Management Service API Version Sets",
"description": "This module deploys an API Management Service API Version Set.",
Expand Down Expand Up @@ -1262,8 +1262,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "7988688467600216709"
"version": "0.23.1.45101",
"templateHash": "4791396269511004286"
},
"name": "API Management Service Authorization Servers",
"description": "This module deploys an API Management Service Authorization Server.",
Expand Down Expand Up @@ -1510,8 +1510,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "3713166604792624713"
"version": "0.23.1.45101",
"templateHash": "14371393063475773678"
},
"name": "API Management Service Backends",
"description": "This module deploys an API Management Service Backend.",
Expand Down Expand Up @@ -1704,8 +1704,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "4933923478377534151"
"version": "0.23.1.45101",
"templateHash": "10312358305910336044"
},
"name": "API Management Service Caches",
"description": "This module deploys an API Management Service Cache.",
Expand Down Expand Up @@ -1855,8 +1855,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "13822474427587974385"
"version": "0.23.1.45101",
"templateHash": "13036858747462562466"
},
"name": "API Management Service Identity Providers",
"description": "This module deploys an API Management Service Identity Provider.",
Expand Down Expand Up @@ -2074,8 +2074,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "16893893897869493831"
"version": "0.23.1.45101",
"templateHash": "14872932654104188944"
},
"name": "API Management Service Named Values",
"description": "This module deploys an API Management Service Named Value.",
Expand Down Expand Up @@ -2236,8 +2236,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "1124223085084988655"
"version": "0.23.1.45101",
"templateHash": "12676245745541867340"
},
"name": "API Management Service Portal Settings",
"description": "This module deploys an API Management Service Portal Setting.",
Expand Down Expand Up @@ -2359,8 +2359,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "3650757020022888901"
"version": "0.23.1.45101",
"templateHash": "16586961527396343119"
},
"name": "API Management Service Policies",
"description": "This module deploys an API Management Service Policy.",
Expand Down Expand Up @@ -2499,8 +2499,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "2758822676627115160"
"version": "0.23.1.45101",
"templateHash": "8527180272588578376"
},
"name": "API Management Service Products",
"description": "This module deploys an API Management Service Product.",
Expand Down Expand Up @@ -2648,8 +2648,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "16488730655399972556"
"version": "0.23.1.45101",
"templateHash": "17352324470715058273"
},
"name": "API Management Service Products APIs",
"description": "This module deploys an API Management Service Product API.",
Expand Down Expand Up @@ -2762,8 +2762,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "14085709622188800883"
"version": "0.23.1.45101",
"templateHash": "16541523008963717147"
},
"name": "API Management Service Products Groups",
"description": "This module deploys an API Management Service Product Group.",
Expand Down Expand Up @@ -2928,8 +2928,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "10733141744485121232"
"version": "0.23.1.45101",
"templateHash": "15367144313924447449"
},
"name": "API Management Service Subscriptions",
"description": "This module deploys an API Management Service Subscription.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ module testDeployment '../../../main.bicep' = {
]
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ module testDeployment '../../../main.bicep' = {
]
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
}
Expand Down
16 changes: 8 additions & 8 deletions modules/app-configuration/configuration-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
}
]
managedIdentities: {
userAssignedResourcesIds: [
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
Expand Down Expand Up @@ -196,7 +196,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
},
"managedIdentities": {
"value": {
"userAssignedResourcesIds": [
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
Expand Down Expand Up @@ -281,7 +281,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
}
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
Expand Down Expand Up @@ -372,7 +372,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
"managedIdentities": {
"value": {
"systemAssigned": true,
"userAssignedResourcesIds": [
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
Expand Down Expand Up @@ -558,7 +558,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
}
managedIdentities: {
systemAssigned: true
userAssignedResourcesIds: [
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
Expand Down Expand Up @@ -649,7 +649,7 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
"managedIdentities": {
"value": {
"systemAssigned": true,
"userAssignedResourcesIds": [
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
Expand Down Expand Up @@ -953,7 +953,7 @@ The managed identity definition for this resource.
| Name | Required | Type | Description |
| :-- | :-- | :--| :-- |
| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | No | bool | Optional. Enables system assigned managed identity on the resource. |
| [`userAssignedResourcesIds`](#parameter-managedidentitiesuserassignedresourcesids) | No | array | Optional. The resource ID(s) to assign to the resource. |
| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | No | array | Optional. The resource ID(s) to assign to the resource. |

### Parameter: `managedIdentities.systemAssigned`

Expand All @@ -962,7 +962,7 @@ Optional. Enables system assigned managed identity on the resource.
- Required: No
- Type: bool

### Parameter: `managedIdentities.userAssignedResourcesIds`
### Parameter: `managedIdentities.userAssignedResourceIds`

Optional. The resource ID(s) to assign to the resource.

Expand Down
6 changes: 3 additions & 3 deletions modules/app-configuration/configuration-store/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ param privateEndpoints privateEndpointType

var enableReferencedModulesTelemetry = false

var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourcesIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }

var identity = !empty(managedIdentities) ? {
type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourcesIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourcesIds ?? {}) ? 'UserAssigned' : null)
type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
} : null

Expand Down Expand Up @@ -247,7 +247,7 @@ type managedIdentitiesType = {
systemAssigned: bool?

@description('Optional. The resource ID(s) to assign to the resource.')
userAssignedResourcesIds: string[]?
userAssignedResourceIds: string[]?
}?

type lockType = {
Expand Down
Loading
Loading