Octopus Deploy Documentation

Create Azure Cloud Service Target Command

Last updated

Azure Cloud Service

Command: New-OctopusAzureCloudServiceTarget

Parameter Value
-name Name for the Octopus deployment target
-azureCloudServiceName Name of the Azure Cloud Service
-azureStorageAccount Name of the Azure Storage Account
-azureDeploymentSlot Deployment slot.
Options are staging (default), production)
-swap Swap staging to production, or just deploy.
Options are swap (default), deploy
-instanceCount Use the current instance count from Azure, or use the value in the configuration file.
Options are current (default), configuration
-octopusAccountIdOrName Name or Id of the Account Resource in Octopus. Must be a Management Certificate Account
-octopusRoles Comma separated list of Roles to assign
-updateIfExisting Will update an existing Cloud Service target with the same name, create if it doesn't exist

Example:

# Using default options
New-OctopusAzureCloudServiceTarget -name "My Azure Cloud Service Target" `
                                   -azureCloudServiceName "CloudService1" `
                                   -azureStorageAccount "MyAzureCloudStorageAccount" `
                                   -octopusAccountIdOrName "Service Management Cert Account" `
                                   -octopusRoles "AzureCloudService" `
                                   -updateIfExisting

# Overriding default values
New-OctopusAzureCloudServiceTarget -name "My Azure Cloud Service Target" `
                                   -azureCloudServiceName "CloudService1" `
                                   -azureStorageAccount "MyAzureCloudStorageAccount" `
                                   -azureDeploymentSlot "production" `
                                   -swap "deploy" `
                                   -instanceCount "configuration" `
                                   -octopusAccountIdOrName "Service Management Cert Account" `
                                   -octopusRoles "AzureCloudService"

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.