Create Azure Web App target command

Azure Web App

Command: New-OctopusAzureWebAppTarget

ParameterValue
-namename for the Octopus deployment target
-azureWebAppName of the Azure Web App
-azureWebAppSlotName of the Azure Web App Slot
-azureResourceGroupNameName of the Azure Resource Group
-octopusAccountIdOrNameName or Id of the Account Resource in Octopus
-octopusRolesComma separated list of target tags to assign
-updateIfExistingWill update an existing Web App target with the same name, create if it doesn’t exist
-octopusDefaultWorkerPoolIdOrNameName or Id of the Worker Pool for the deployment target to use. (Optional). Added in 2020.6.0.

Examples

# Using default options
New-OctopusAzureWebAppTarget -name "My Azure Web Application" `
                             -azureWebApp "WebApp1" `
                             -azureResourceGroupName "WebApp1-ResourceGroup"  `
                             -octopusAccountIdOrName "Dev Azure Account" `
                             -octopusRoles "AzureWebApp" `
                             -updateIfExisting

# Specifying a default worker pool for the target
New-OctopusAzureWebAppTarget -name "My Azure Web Application" `
                             -azureWebApp "WebApp1" `
                             -azureResourceGroupName "WebApp1-ResourceGroup"  `
                             -octopusAccountIdOrName "Dev Azure Account" `
                             -octopusRoles "AzureWebApp" `
                             -octopusDefaultWorkerPoolIdOrName "Worker Pool with Azure Access" `
                             -updateIfExisting

If your process creates dynamic deployment targets from a script, and then deploys to those targets in a subsequent step, make sure you add a full health check step for the role of the newly created targets after the step that creates and registers the targets.

This allows Octopus to ensure the new targets are ready for deployment by staging packages required by subsequent steps that perform the deployment.

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Thursday, June 27, 2024