Create Azure Service Fabric target command

Azure Service Fabric

Command: New-OctopusAzureServiceFabricTarget

-nameName for the Octopus deployment target
-azureConnectionEndpointConnection endpoint for the Service Fabric Cluster
-azureSecurityModeSecurity mode, use one of the aliases in the table below
-azureCertificateThumbprintCertificate thumbprint of the Azure Certificate
-azureActiveDirectoryUsernameUsername for accessing the Service Fabric Cluster
-azureActiveDirectoryPasswordPassword for accessing the Service Fabric Cluster
-certificateStoreLocation(Optional) Override the default certificate store location
-certificateStoreName(Optional) Override the default certificate store name
-octopusCertificateIdOrNameName or Id of the Certificate Resource in Octopus
-octopusRolesComma separated list of Roles to assign
-updateIfExistingWill update an existing Service Fabric 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.

Security Mode Options

Secure Client Certificatecertificate clientcertificate secureclientcertificate
Secure Azure Active Directoryaad azureactivedirectory


# Unsecure
New-OctopusAzureServiceFabricTarget -name "My Service Fabric Target 1" `
                                    -azureConnectionEndpoint "connectionEndpoint" `
                                    -azureSecurityMode "unsecure" `
                                    -octopusRoles "ServiceFabricRole" `

# Client Certificate
New-OctopusAzureServiceFabricTarget -name "My Service Fabric Target 2" `
                                    -azureConnectionEndpoint "connectionEndpoint" `
                                    -azureSecurityMode "certificate" `
                                    -azureCertificateThumbprint "1234567890" `
                                    -octopusCertificateIdOrName "My Service Fabric Certificate" `
                                    -octopusRoles "Service Fabric Role"

# Client Certificate overriding certificate store
New-OctopusAzureServiceFabricTarget -name "My Service Fabric Target 3" `
                                    -azureConnectionEndpoint "https://localhost" `
                                    -azureSecurityMode "certificate" `
                                    -azureCertificateThumbprint "1234" `
                                    -certificateStoreLocation "Custom Store Location" `
                                    -certificateStoreName "My Store Name" `
                                    -octopusCertificateIdOrName "cert" `
                                    -octopusRoles "sfrole"

# Azure Active Directory
New-OctopusAzureServiceFabricTarget -name "My Service Fabric Target 4" `
                                   -azureConnectionEndpoint "connectionEndpoint" `
                                   -azureSecurityMode  "azureactivedirectory" `
                                   -azureCertificateThumbprint "1234567890" `
                                   -octopusCertificateIdOrName "cert" `
                                   -octopusRoles "Service Fabric Role"

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 Sunday, January 1, 2023