We are using Octopus cloud, and have a pretty simple configuration where we deploy to an Azure WebApp using a deployment target. We then follow up the deployment with an Azure powershell script step that tweaks certain things in the app according to tenant variables.
However, we haven’t been able to access the target WebApp name (or slot name) in the powershell script using Octopus variables. We’re attempting to do the following:
$siteName = $OctopusParameters[“Octopus.Action.Azure.WebAppName”]
$slotName = $OctopusParameters[“Octopus.Action.Azure.WebAppSlotName”]
$app = Get-AzureRmWebAppSlot -ResourceGroupName $resourceGroup -Name $siteName -Slot $slotName
…but the Octopus parameters are always blank. (We’ve tried every variable we can find that might be relevant)
Is there anyway to access the name of the Azure webapp to which we just deployed from this powershell script?