Table of Contents

Initialize-CafAdoToAcrServiceConnection

Initializes an Azure DevOps service connection to an Azure Container Registry (ACR).

Syntax

Initialize-CafAdoToAcrServiceConnection
    [-AcrName <string>]
    [-DevOpsOrganizationName <string>]
    [-DevOpsProjectId <string>]
    [-DevOpsProjectName <string>]
    [-ServiceConnectionName <string>]
    [-SubscriptionId <string>]
    [-SubscriptionName <string>]
    [-TenantId <string>]

Description

Creates a Docker Registry service connection in Azure DevOps configured to use a service principal for authentication with Azure Container Registry. If TenantId is not provided, it is resolved from the CAF context or the current Azure context.

Example

Initialize-CafAdoToAcrServiceConnection
    -DevOpsOrganizationName "myorg"
    -DevOpsProjectName "myproject"
    -ServiceConnectionName "MyAcrConnection"
    -AcrName "myacr"
    -SubscriptionId "xxxx-xxxx-xxxx-xxxx"
    -TenantId "zzzz-zzzz-zzzz-zzzz"

Parameter

-AcrName The name of the Azure Container Registry.

Property Value
Type: string
Default value: ""
Required: False

-DevOpsOrganizationName The name of the Azure DevOps organization.

Property Value
Type: string
Default value: None
Required: False

-DevOpsProjectId The ID of the Azure DevOps project. If not provided, the ID is resolved from -DevOpsProjectName.

Property Value
Type: string
Default value: None
Required: False

-DevOpsProjectName The name of the Azure DevOps project.

Property Value
Type: string
Default value: None
Required: False

-ServiceConnectionName The desired name for the new service connection in Azure DevOps.

Property Value
Type: string
Default value: "Acr"
Required: False

-SubscriptionId The Azure Subscription ID where the ACR resides.

Property Value
Type: string
Default value: None
Required: False

-SubscriptionName The name of the Azure subscription. If not provided, the name is resolved from -SubscriptionId.

Property Value
Type: string
Default value: None
Required: False

-TenantId The Azure AD Tenant ID. If not provided, resolved from the CAF context or current Azure context.

Property Value
Type: string
Default value: None
Required: False