Amateur
Amateur

Reputation: 397

Reference other deployment slot from app service in Bicep

I am trying to retrieve the principalId from the staging slot in Bicep. my code is the following.

resource App 'Microsoft.Web/sites@2016-08-01' existing = { 
    name: WebAppName
    scope: resourceGroup(ResourceGroupName)
}
...
...
id: App.identity.principalId
stagingId: ?????

How can I access the other slot? intellisense does not seem to help me.

Thx!

Upvotes: 1

Views: 545

Answers (1)

JustAGuy
JustAGuy

Reputation: 151

If I understand you correctly you want.

resource AppStagingSlot 'Microsoft.Web/sites/slots@2016-08-01' existing = { 
   parent: App
   name: 'staging'
   scope: resourceGroup(ResourceGroupName)
}

Upvotes: 2

Related Questions