Skip to content
Discussion options

You must be logged in to vote

ARM templates are subject to the same limitation around not being able to deploy the same resource twice in a single template. The example you shared from StackOverflow uses a nested deployment to work around this fact. You should be able to achieve the same in Bicep with the following by using modules.

Here I've decompiled and cleaned up the StackOverflow sample:

  • main.bicep
    param keyName string = ''
    param keyVersion string = ''
    param vaultName string = ''
    param location string = resourceGroup().location
    param accountName string = 'tetsdfgfgdffd'
    
    resource storageAcc 'Microsoft.Storage/storageAccounts@2019-06-01' = {
      sku: {
        name: 'Standard_LRS'
        tier: 'Standard'
      }
      kind: 'Sto…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Koalion
Comment options

@alex-frankel
Comment options

Answer selected by Koalion
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants