Skip to content

Commit

Permalink
Make tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbud committed May 9, 2024
1 parent 9dd734d commit 130d7ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
targetScope = 'subscription'
metadata name = 'Resource Role Assignments'
metadata description = 'This module deploys a Role Assignment at a Resource scope using minimal parameters.'
metadata description = 'This module deploys a Resource Role Assignment using minimal parameters.'

// ========== //
// Parameters //
Expand Down Expand Up @@ -47,10 +47,13 @@ module nestedDependencies 'dependencies.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
name: '${guid(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
scope: resourceGroup
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
name: guid(
nestedDependencies.outputs.managedIdentityPrincipalId,
nestedDependencies.outputs.storageAccountResourceId
)
resourceId: nestedDependencies.outputs.storageAccountResourceId
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ module nestedDependencies 'dependencies.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
name: '${guid(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
scope: resourceGroup
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
resourceId: ''
name: guid(
nestedDependencies.outputs.managedIdentityPrincipalId,
nestedDependencies.outputs.storageAccountResourceId,
)
resourceId: nestedDependencies.outputs.storageAccountResourceId
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
roleDefinitionId: '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1' // Storage Blob Data Reader
Expand Down

0 comments on commit 130d7ca

Please sign in to comment.