From 3e2402df353608663b230a0dfb7644c328c9980c Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 08:29:34 +0100 Subject: [PATCH 01/13] test SA --- .../workflows/ms.storage.storageaccounts.yml | 30 +++++++++---------- .../storageAccounts/deploy.bicep | 22 +++++++------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index df763612ad..9bb0209057 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -63,21 +63,21 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - #################### - # Pester Tests # - #################### - job_module_pester_validation: - runs-on: ubuntu-20.04 - name: 'Pester tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Run tests' - uses: ./.github/actions/templates/validateModulePester - with: - modulePath: '${{ env.modulePath }}' + # #################### + # # Pester Tests # + # #################### + # job_module_pester_validation: + # runs-on: ubuntu-20.04 + # name: 'Pester tests' + # steps: + # - name: 'Checkout' + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: 'Run tests' + # uses: ./.github/actions/templates/validateModulePester + # with: + # modulePath: '${{ env.modulePath }}' #################### # Deployment tests # diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 5d69da5544..a6265df5a0 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -317,17 +317,19 @@ module storageAccount_tableServices 'tableServices/deploy.bicep' = if (!empty(ta } } -@description('The resource ID of the deployed storage account') -output storageAccountResourceId string = storageAccount.id +output storageAccount object = storageAccount -@description('The name of the deployed storage account') -output storageAccountName string = storageAccount.name +// @description('The resource ID of the deployed storage account') +// output storageAccountResourceId string = storageAccount.id -@description('The resource group of the deployed storage account') -output storageAccountResourceGroup string = resourceGroup().name +// @description('The name of the deployed storage account') +// output storageAccountName string = storageAccount.name -@description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob +// @description('The resource group of the deployed storage account') +// output storageAccountResourceGroup string = resourceGroup().name -@description('The principal ID of the system assigned identity.') -output systemAssignedPrincipalId string = systemAssignedIdentity ? storageAccount.identity.principalId : '' +// @description('The primary blob endpoint reference if blob services are deployed.') +// output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob + +// @description('The principal ID of the system assigned identity.') +// output systemAssignedPrincipalId string = systemAssignedIdentity ? storageAccount.identity.principalId : '' From bd21d957b5b3a8adcf995ec526879b762413f6f1 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 08:31:25 +0100 Subject: [PATCH 02/13] fix --- .../workflows/ms.storage.storageaccounts.yml | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 9bb0209057..0083a0cef8 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -87,7 +87,7 @@ jobs: name: 'Deployment tests' needs: - job_set_workflow_param - - job_module_pester_validation + # - job_module_pester_validation strategy: fail-fast: false matrix: @@ -113,36 +113,36 @@ jobs: managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}' - ############### - # PUBLISH # - ############### - job_publish_module: - name: 'Publish module' - if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) - runs-on: ubuntu-20.04 - needs: - - job_set_workflow_param - - job_module_deploy_validation - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set environment variables - uses: deep-mm/set-variables@v1.0 - with: - variableFileName: 'global.variables' - - name: 'Publish module' - uses: ./.github/actions/templates/publishModule - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' - customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' - templateSpecsRGName: '${{ env.templateSpecsRGName }}' - templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' - templateSpecsDescription: '${{ env.templateSpecsDescription }}' - templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' - bicepRegistryName: '${{ env.bicepRegistryName }}' - bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' - bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' - bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + # ############### + # # PUBLISH # + # ############### + # job_publish_module: + # name: 'Publish module' + # if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) + # runs-on: ubuntu-20.04 + # needs: + # - job_set_workflow_param + # - job_module_deploy_validation + # steps: + # - name: 'Checkout' + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: Set environment variables + # uses: deep-mm/set-variables@v1.0 + # with: + # variableFileName: 'global.variables' + # - name: 'Publish module' + # uses: ./.github/actions/templates/publishModule + # with: + # templateFilePath: '${{ env.modulePath }}/deploy.bicep' + # versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' + # customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' + # templateSpecsRGName: '${{ env.templateSpecsRGName }}' + # templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' + # templateSpecsDescription: '${{ env.templateSpecsDescription }}' + # templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' + # bicepRegistryName: '${{ env.bicepRegistryName }}' + # bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' + # bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' + # bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' From ba710b3a6bffc4b5318757087038686731a2c2c9 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 08:44:15 +0100 Subject: [PATCH 03/13] retest --- .../storageAccounts/deploy.bicep | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index a6265df5a0..4d5c018b60 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -319,17 +319,17 @@ module storageAccount_tableServices 'tableServices/deploy.bicep' = if (!empty(ta output storageAccount object = storageAccount -// @description('The resource ID of the deployed storage account') -// output storageAccountResourceId string = storageAccount.id +@description('The resource ID of the deployed storage account') +output storageAccountResourceId string = storageAccount.id -// @description('The name of the deployed storage account') -// output storageAccountName string = storageAccount.name +@description('The name of the deployed storage account') +output storageAccountName string = storageAccount.name -// @description('The resource group of the deployed storage account') -// output storageAccountResourceGroup string = resourceGroup().name +@description('The resource group of the deployed storage account') +output storageAccountResourceGroup string = resourceGroup().name -// @description('The primary blob endpoint reference if blob services are deployed.') -// output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob +@description('The primary blob endpoint reference if blob services are deployed.') +output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob -// @description('The principal ID of the system assigned identity.') -// output systemAssignedPrincipalId string = systemAssignedIdentity ? storageAccount.identity.principalId : '' +@description('The principal ID of the system assigned identity.') +output systemAssignedPrincipalId string = systemAssignedIdentity ? storageAccount.identity.principalId : '' From 1b693e85ebd0bfa023f66ac9ba7c8fa5eac3ad8d Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 09:39:47 +0100 Subject: [PATCH 04/13] test condition --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 4d5c018b60..af515ea34d 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -332,4 +332,4 @@ output storageAccountResourceGroup string = resourceGroup().name output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob @description('The principal ID of the system assigned identity.') -output systemAssignedPrincipalId string = systemAssignedIdentity ? storageAccount.identity.principalId : '' +output systemAssignedPrincipalId string = (systemAssignedIdentity && contains(storageAccount.identity, 'principalId')) ? storageAccount.identity.principalId : '' From 3f8cf54a9741aec59ebeb945f7c60c7136ece2e2 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 11:28:10 +0100 Subject: [PATCH 05/13] test --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index af515ea34d..3d98c0b4d2 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -332,4 +332,4 @@ output storageAccountResourceGroup string = resourceGroup().name output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob @description('The principal ID of the system assigned identity.') -output systemAssignedPrincipalId string = (systemAssignedIdentity && contains(storageAccount.identity, 'principalId')) ? storageAccount.identity.principalId : '' +output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' From 3b316c95499585b28e4b023ba380266436b4a5eb Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 17:31:09 +0100 Subject: [PATCH 06/13] corrected 'storageAccountPrimaryBlobEndpoint' output --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 3d98c0b4d2..4e8244eb83 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -317,8 +317,6 @@ module storageAccount_tableServices 'tableServices/deploy.bicep' = if (!empty(ta } } -output storageAccount object = storageAccount - @description('The resource ID of the deployed storage account') output storageAccountResourceId string = storageAccount.id @@ -329,7 +327,7 @@ output storageAccountName string = storageAccount.name output storageAccountResourceGroup string = resourceGroup().name @description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob +output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' From f3faf7d67e8ebda53c2dae35085a8ac7a11567cc Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 5 Jan 2022 17:31:56 +0100 Subject: [PATCH 07/13] test --- .github/workflows/ms.storage.storageaccounts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 0083a0cef8..76c88e1bc4 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -22,8 +22,8 @@ on: required: false default: '0.0.1' push: - branches: - - main + # branches: + # - main paths: - '.github/actions/templates/**' - '.github/workflows/ms.storage.storageaccounts.yml' From 8d02c163b1ca7f4d4dca7e2cd492a0936458945a Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:08:07 +0100 Subject: [PATCH 08/13] fix storage account --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 4e8244eb83..2eee0cff51 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -327,7 +327,7 @@ output storageAccountName string = storageAccount.name output storageAccountResourceGroup string = resourceGroup().name @description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' +output storageAccountPrimaryBlobEndpoint string = !empty(blobServices) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' From 6f3a74d8c539e56ae7e9ac3cfe6a254d664a88dc Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:33:10 +0100 Subject: [PATCH 09/13] fix --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 2eee0cff51..7ccd5af293 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -327,7 +327,7 @@ output storageAccountName string = storageAccount.name output storageAccountResourceGroup string = resourceGroup().name @description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = !empty(blobServices) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' +output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' From 877a6139849705979c1a9888e905e9a6af60f54c Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:39:27 +0100 Subject: [PATCH 10/13] reset workflow --- .../workflows/ms.storage.storageaccounts.yml | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 76c88e1bc4..c66789a8a5 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -22,8 +22,8 @@ on: required: false default: '0.0.1' push: - # branches: - # - main + branches: + - main paths: - '.github/actions/templates/**' - '.github/workflows/ms.storage.storageaccounts.yml' @@ -63,21 +63,21 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - # #################### - # # Pester Tests # - # #################### - # job_module_pester_validation: - # runs-on: ubuntu-20.04 - # name: 'Pester tests' - # steps: - # - name: 'Checkout' - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - name: 'Run tests' - # uses: ./.github/actions/templates/validateModulePester - # with: - # modulePath: '${{ env.modulePath }}' + #################### + # Pester Tests # + #################### + job_module_pester_validation: + runs-on: ubuntu-20.04 + name: 'Pester tests' + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: 'Run tests' + uses: ./.github/actions/templates/validateModulePester + with: + modulePath: '${{ env.modulePath }}' #################### # Deployment tests # @@ -113,36 +113,36 @@ jobs: managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}' - # ############### - # # PUBLISH # - # ############### - # job_publish_module: - # name: 'Publish module' - # if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) - # runs-on: ubuntu-20.04 - # needs: - # - job_set_workflow_param - # - job_module_deploy_validation - # steps: - # - name: 'Checkout' - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - name: Set environment variables - # uses: deep-mm/set-variables@v1.0 - # with: - # variableFileName: 'global.variables' - # - name: 'Publish module' - # uses: ./.github/actions/templates/publishModule - # with: - # templateFilePath: '${{ env.modulePath }}/deploy.bicep' - # versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' - # customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' - # templateSpecsRGName: '${{ env.templateSpecsRGName }}' - # templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' - # templateSpecsDescription: '${{ env.templateSpecsDescription }}' - # templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' - # bicepRegistryName: '${{ env.bicepRegistryName }}' - # bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' - # bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' - # bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + ############### + # PUBLISH # + ############### + job_publish_module: + name: 'Publish module' + if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) + runs-on: ubuntu-20.04 + needs: + - job_set_workflow_param + - job_module_deploy_validation + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set environment variables + uses: deep-mm/set-variables@v1.0 + with: + variableFileName: 'global.variables' + - name: 'Publish module' + uses: ./.github/actions/templates/publishModule + with: + templateFilePath: '${{ env.modulePath }}/deploy.bicep' + versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' + customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' + templateSpecsRGName: '${{ env.templateSpecsRGName }}' + templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' + templateSpecsDescription: '${{ env.templateSpecsDescription }}' + templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' + bicepRegistryName: '${{ env.bicepRegistryName }}' + bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' + bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' + bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' From 5ed22161da93f61f020b767ff098e56e5fb1ba4f Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:40:47 +0100 Subject: [PATCH 11/13] fix output issue for 'storageAccountPrimaryBlobEndpoint' --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 7ccd5af293..2eee0cff51 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -327,7 +327,7 @@ output storageAccountName string = storageAccount.name output storageAccountResourceGroup string = resourceGroup().name @description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = (!empty(blobServices) && contains(storageAccount_blobServices, 'blobContainers')) ? '' : reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob +output storageAccountPrimaryBlobEndpoint string = !empty(blobServices) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' From 5df4356caf1722bc5cfe9843c33d8924e4292336 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:47:37 +0100 Subject: [PATCH 12/13] reset workflow file --- .github/workflows/ms.storage.storageaccounts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index c66789a8a5..df763612ad 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -87,7 +87,7 @@ jobs: name: 'Deployment tests' needs: - job_set_workflow_param - # - job_module_pester_validation + - job_module_pester_validation strategy: fail-fast: false matrix: From de1bc7815f879a4aae8f33a84c2358f99eb9c925 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 6 Jan 2022 12:31:28 +0100 Subject: [PATCH 13/13] Update arm/Microsoft.Storage/storageAccounts/deploy.bicep Co-authored-by: Alexander Sehr --- arm/Microsoft.Storage/storageAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index 2eee0cff51..636d150d83 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -327,7 +327,7 @@ output storageAccountName string = storageAccount.name output storageAccountResourceGroup string = resourceGroup().name @description('The primary blob endpoint reference if blob services are deployed.') -output storageAccountPrimaryBlobEndpoint string = !empty(blobServices) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' +output storageAccountPrimaryBlobEndpoint string = !empty(blobServices) && contains(blobServices, 'containers')) ? reference('Microsoft.Storage/storageAccounts/${storageAccount.name}', '2019-04-01').primaryEndpoints.blob : '' @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : ''