Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' existing = {
}

module authorizationServer '../authorizationServers/deploy.bicep' = {
name: '${apiManagementServiceName}-authorizationServer-${name}'
name: '${deployment().name}-AuthorizationServer'
params: {
apiManagementServiceName: apiManagementServiceName
serverDescription: serverDescription
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.ApiManagement/service/apis/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ resource api 'Microsoft.ApiManagement/service/apis@2020-06-01-preview' = {
}
}

module policy 'policies/deploy.bicep' = [for policy in policies: {
name: '${uniqueString(deployment().name, api.name)}-policy-${policy.name}'
module policy 'policies/deploy.bicep' = [for (policy, index) in policies: {
name: '${deployment().name}-Policy-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
apiName: api.name
Expand Down
24 changes: 12 additions & 12 deletions arm/Microsoft.ApiManagement/service/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ resource apiManagementService 'Microsoft.ApiManagement/service@2020-12-01' = {
}

module apis_resource 'apis/deploy.bicep' = [for (api, index) in apis: {
name: '${uniqueString(deployment().name, location)}-api-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Api-${index}'
params: {
apiManagementServiceName: apiManagementService.name
displayName: api.displayName
Expand Down Expand Up @@ -243,7 +243,7 @@ module apis_resource 'apis/deploy.bicep' = [for (api, index) in apis: {
}]

module apiVersionSet_resource 'apiVersionSets/deploy.bicep' = [for (apiVersionSet, index) in apiVersionSets: {
name: '${uniqueString(deployment().name, location)}-apiVersionSet-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-ApiVersionSet-${index}'
params: {
apiManagementServiceName: apiManagementService.name
name: apiVersionSet.name
Expand All @@ -252,7 +252,7 @@ module apiVersionSet_resource 'apiVersionSets/deploy.bicep' = [for (apiVersionSe
}]

module authorizationServers_resource '.bicep/nested_authorizationServers.bicep' = [for (authorizationServer, index) in authorizationServers: {
name: '${uniqueString(deployment().name, location)}-authorizationServer-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-AuthorizationServer-${index}'
params: {
apiManagementServiceName: apiManagementService.name
name: authorizationServer.name
Expand Down Expand Up @@ -282,7 +282,7 @@ module authorizationServers_resource '.bicep/nested_authorizationServers.bicep'
}]

module backends_resource 'backends/deploy.bicep' = [for (backend, index) in backends: {
name: '${uniqueString(deployment().name, location)}-backend-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Backend-${index}'
params: {
apiManagementServiceName: apiManagementService.name
url: contains(backend, 'url') ? backend.url : ''
Expand All @@ -302,7 +302,7 @@ module backends_resource 'backends/deploy.bicep' = [for (backend, index) in back
}]

module caches_resource 'caches/deploy.bicep' = [for (cache, index) in caches: {
name: '${uniqueString(deployment().name, location)}-cache-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Cache-${index}'
params: {
apiManagementServiceName: apiManagementService.name
cacheDescription: contains(cache, 'cacheDescription') ? cache.cacheDescription : ''
Expand All @@ -314,7 +314,7 @@ module caches_resource 'caches/deploy.bicep' = [for (cache, index) in caches: {
}]

module identityProvider_resource 'identityProviders/deploy.bicep' = [for (identityProvider, index) in identityProviders: {
name: '${uniqueString(deployment().name, location)}-identityProvider-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-IdentityProvider-${index}'
params: {
apiManagementServiceName: apiManagementService.name
name: identityProvider.name
Expand All @@ -333,7 +333,7 @@ module identityProvider_resource 'identityProviders/deploy.bicep' = [for (identi
}]

module namedValues_resource 'namedValues/deploy.bicep' = [for (namedValue, index) in namedValues: {
name: '${uniqueString(deployment().name, location)}-namedValue-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-NamedValue-${index}'
params: {
apiManagementServiceName: apiManagementService.name
displayName: namedValue.displayName
Expand All @@ -346,7 +346,7 @@ module namedValues_resource 'namedValues/deploy.bicep' = [for (namedValue, index
}]

module portalSettings_resource 'portalsettings/deploy.bicep' = [for (portalSetting, index) in portalSettings: {
name: '${uniqueString(deployment().name, location)}-portalSetting-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-PortalSetting-${index}'
params: {
apiManagementServiceName: apiManagementService.name
name: portalSetting.name
Expand All @@ -355,7 +355,7 @@ module portalSettings_resource 'portalsettings/deploy.bicep' = [for (portalSetti
}]

module policy_resource 'policies/deploy.bicep' = [for (policy, index) in policies: {
name: '${uniqueString(deployment().name, location)}-policy-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Policy-${index}'
params: {
apiManagementServiceName: apiManagementService.name
value: policy.value
Expand All @@ -364,7 +364,7 @@ module policy_resource 'policies/deploy.bicep' = [for (policy, index) in policie
}]

module products_resource 'products/deploy.bicep' = [for (product, index) in products: {
name: '${uniqueString(deployment().name, location)}-product-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Product-${index}'
params: {
apiManagementServiceName: apiManagementService.name
apis: contains(product, 'apis') ? product.apis : []
Expand All @@ -383,7 +383,7 @@ module products_resource 'products/deploy.bicep' = [for (product, index) in prod
}]

module subscriptions_resource 'subscriptions/deploy.bicep' = [for (subscription, index) in subscriptions: {
name: '${uniqueString(deployment().name, location)}-subscription-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Subscription-${index}'
params: {
apiManagementServiceName: apiManagementService.name
name: contains(subscription, 'name') ? subscription.name : ''
Expand Down Expand Up @@ -419,7 +419,7 @@ resource apiManagementService_diagnosticSettings 'Microsoft.Insights/diagnosticS
}

module apiManagementService_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-Apim-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
8 changes: 4 additions & 4 deletions arm/Microsoft.ApiManagement/service/products/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ resource product 'Microsoft.ApiManagement/service/products@2020-06-01-preview' =
}
}

module api 'apis/deploy.bicep' = [for api in apis: {
name: '${uniqueString(deployment().name, name)}-api-${api.name}'
module api 'apis/deploy.bicep' = [for (api, index) in apis: {
name: '${deployment().name}-Api-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: api.name
productName: name
}
}]

module group 'groups/deploy.bicep' = [for group in groups: {
name: '${uniqueString(deployment().name, name)}-group-${group.name}'
module group 'groups/deploy.bicep' = [for (group, index) in groups: {
name: '${deployment().name}-Group-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: group.name
Expand Down