azuredevops.ServiceEndpointAzureEcr
Explore with Pulumi AI
Manages a Azure Container Registry service endpoint within Azure DevOps.
Example Usage
Authorize with Service Principal
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = new azuredevops.Project("example", {
    name: "Example Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
    description: "Managed by Pulumi",
});
// azure container registry service connection
const exampleServiceEndpointAzureEcr = new azuredevops.ServiceEndpointAzureEcr("example", {
    projectId: example.id,
    serviceEndpointName: "Example AzureCR",
    resourceGroup: "example-rg",
    azurecrSpnTenantid: "00000000-0000-0000-0000-000000000000",
    azurecrName: "ExampleAcr",
    azurecrSubscriptionId: "00000000-0000-0000-0000-000000000000",
    azurecrSubscriptionName: "subscription name",
});
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example",
    name="Example Project",
    visibility="private",
    version_control="Git",
    work_item_template="Agile",
    description="Managed by Pulumi")
# azure container registry service connection
example_service_endpoint_azure_ecr = azuredevops.ServiceEndpointAzureEcr("example",
    project_id=example.id,
    service_endpoint_name="Example AzureCR",
    resource_group="example-rg",
    azurecr_spn_tenantid="00000000-0000-0000-0000-000000000000",
    azurecr_name="ExampleAcr",
    azurecr_subscription_id="00000000-0000-0000-0000-000000000000",
    azurecr_subscription_name="subscription name")
package main
import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
			Name:             pulumi.String("Example Project"),
			Visibility:       pulumi.String("private"),
			VersionControl:   pulumi.String("Git"),
			WorkItemTemplate: pulumi.String("Agile"),
			Description:      pulumi.String("Managed by Pulumi"),
		})
		if err != nil {
			return err
		}
		// azure container registry service connection
		_, err = azuredevops.NewServiceEndpointAzureEcr(ctx, "example", &azuredevops.ServiceEndpointAzureEcrArgs{
			ProjectId:               example.ID(),
			ServiceEndpointName:     pulumi.String("Example AzureCR"),
			ResourceGroup:           pulumi.String("example-rg"),
			AzurecrSpnTenantid:      pulumi.String("00000000-0000-0000-0000-000000000000"),
			AzurecrName:             pulumi.String("ExampleAcr"),
			AzurecrSubscriptionId:   pulumi.String("00000000-0000-0000-0000-000000000000"),
			AzurecrSubscriptionName: pulumi.String("subscription name"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() => 
{
    var example = new AzureDevOps.Project("example", new()
    {
        Name = "Example Project",
        Visibility = "private",
        VersionControl = "Git",
        WorkItemTemplate = "Agile",
        Description = "Managed by Pulumi",
    });
    // azure container registry service connection
    var exampleServiceEndpointAzureEcr = new AzureDevOps.ServiceEndpointAzureEcr("example", new()
    {
        ProjectId = example.Id,
        ServiceEndpointName = "Example AzureCR",
        ResourceGroup = "example-rg",
        AzurecrSpnTenantid = "00000000-0000-0000-0000-000000000000",
        AzurecrName = "ExampleAcr",
        AzurecrSubscriptionId = "00000000-0000-0000-0000-000000000000",
        AzurecrSubscriptionName = "subscription name",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.Project;
import com.pulumi.azuredevops.ProjectArgs;
import com.pulumi.azuredevops.ServiceEndpointAzureEcr;
import com.pulumi.azuredevops.ServiceEndpointAzureEcrArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new Project("example", ProjectArgs.builder()
            .name("Example Project")
            .visibility("private")
            .versionControl("Git")
            .workItemTemplate("Agile")
            .description("Managed by Pulumi")
            .build());
        // azure container registry service connection
        var exampleServiceEndpointAzureEcr = new ServiceEndpointAzureEcr("exampleServiceEndpointAzureEcr", ServiceEndpointAzureEcrArgs.builder()
            .projectId(example.id())
            .serviceEndpointName("Example AzureCR")
            .resourceGroup("example-rg")
            .azurecrSpnTenantid("00000000-0000-0000-0000-000000000000")
            .azurecrName("ExampleAcr")
            .azurecrSubscriptionId("00000000-0000-0000-0000-000000000000")
            .azurecrSubscriptionName("subscription name")
            .build());
    }
}
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
      description: Managed by Pulumi
  # azure container registry service connection
  exampleServiceEndpointAzureEcr:
    type: azuredevops:ServiceEndpointAzureEcr
    name: example
    properties:
      projectId: ${example.id}
      serviceEndpointName: Example AzureCR
      resourceGroup: example-rg
      azurecrSpnTenantid: 00000000-0000-0000-0000-000000000000
      azurecrName: ExampleAcr
      azurecrSubscriptionId: 00000000-0000-0000-0000-000000000000
      azurecrSubscriptionName: subscription name
Authorize with WorkloadIdentityFederation
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as azuredevops from "@pulumi/azuredevops";
const example = new azuredevops.Project("example", {
    name: "Example Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
    description: "Managed by Pulumi",
});
const identity = new azure.core.ResourceGroup("identity", {
    name: "identity",
    location: "UK South",
});
const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
    location: identity.location,
    name: "example-identity",
    resourceGroupName: identity.name,
});
// azure container registry service connection
const exampleServiceEndpointAzureEcr = new azuredevops.ServiceEndpointAzureEcr("example", {
    projectId: example.id,
    resourceGroup: "Example AzureCR ResourceGroup",
    serviceEndpointName: "Example AzureCR",
    serviceEndpointAuthenticationScheme: "WorkloadIdentityFederation",
    azurecrSpnTenantid: "00000000-0000-0000-0000-000000000000",
    azurecrName: "ExampleAcr",
    azurecrSubscriptionId: "00000000-0000-0000-0000-000000000000",
    azurecrSubscriptionName: "subscription name",
    credentials: {
        serviceprincipalid: exampleUserAssignedIdentity.clientId,
    },
});
const exampleFederatedIdentityCredential = new azure.armmsi.FederatedIdentityCredential("example", {
    name: "example-federated-credential",
    resourceGroupName: identity.name,
    parentId: exampleUserAssignedIdentity.id,
    audience: "api://AzureADTokenExchange",
    issuer: exampleServiceEndpointAzureEcr.workloadIdentityFederationIssuer,
    subject: exampleServiceEndpointAzureEcr.workloadIdentityFederationSubject,
});
import pulumi
import pulumi_azure as azure
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example",
    name="Example Project",
    visibility="private",
    version_control="Git",
    work_item_template="Agile",
    description="Managed by Pulumi")
identity = azure.core.ResourceGroup("identity",
    name="identity",
    location="UK South")
example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
    location=identity.location,
    name="example-identity",
    resource_group_name=identity.name)
# azure container registry service connection
example_service_endpoint_azure_ecr = azuredevops.ServiceEndpointAzureEcr("example",
    project_id=example.id,
    resource_group="Example AzureCR ResourceGroup",
    service_endpoint_name="Example AzureCR",
    service_endpoint_authentication_scheme="WorkloadIdentityFederation",
    azurecr_spn_tenantid="00000000-0000-0000-0000-000000000000",
    azurecr_name="ExampleAcr",
    azurecr_subscription_id="00000000-0000-0000-0000-000000000000",
    azurecr_subscription_name="subscription name",
    credentials={
        "serviceprincipalid": example_user_assigned_identity.client_id,
    })
example_federated_identity_credential = azure.armmsi.FederatedIdentityCredential("example",
    name="example-federated-credential",
    resource_group_name=identity.name,
    parent_id=example_user_assigned_identity.id,
    audience="api://AzureADTokenExchange",
    issuer=example_service_endpoint_azure_ecr.workload_identity_federation_issuer,
    subject=example_service_endpoint_azure_ecr.workload_identity_federation_subject)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/armmsi"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
			Name:             pulumi.String("Example Project"),
			Visibility:       pulumi.String("private"),
			VersionControl:   pulumi.String("Git"),
			WorkItemTemplate: pulumi.String("Agile"),
			Description:      pulumi.String("Managed by Pulumi"),
		})
		if err != nil {
			return err
		}
		identity, err := core.NewResourceGroup(ctx, "identity", &core.ResourceGroupArgs{
			Name:     pulumi.String("identity"),
			Location: pulumi.String("UK South"),
		})
		if err != nil {
			return err
		}
		exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
			Location:          identity.Location,
			Name:              pulumi.String("example-identity"),
			ResourceGroupName: identity.Name,
		})
		if err != nil {
			return err
		}
		// azure container registry service connection
		exampleServiceEndpointAzureEcr, err := azuredevops.NewServiceEndpointAzureEcr(ctx, "example", &azuredevops.ServiceEndpointAzureEcrArgs{
			ProjectId:                           example.ID(),
			ResourceGroup:                       pulumi.String("Example AzureCR ResourceGroup"),
			ServiceEndpointName:                 pulumi.String("Example AzureCR"),
			ServiceEndpointAuthenticationScheme: pulumi.String("WorkloadIdentityFederation"),
			AzurecrSpnTenantid:                  pulumi.String("00000000-0000-0000-0000-000000000000"),
			AzurecrName:                         pulumi.String("ExampleAcr"),
			AzurecrSubscriptionId:               pulumi.String("00000000-0000-0000-0000-000000000000"),
			AzurecrSubscriptionName:             pulumi.String("subscription name"),
			Credentials: &azuredevops.ServiceEndpointAzureEcrCredentialsArgs{
				Serviceprincipalid: exampleUserAssignedIdentity.ClientId,
			},
		})
		if err != nil {
			return err
		}
		_, err = armmsi.NewFederatedIdentityCredential(ctx, "example", &armmsi.FederatedIdentityCredentialArgs{
			Name:              pulumi.String("example-federated-credential"),
			ResourceGroupName: identity.Name,
			ParentId:          exampleUserAssignedIdentity.ID(),
			Audience:          pulumi.String("api://AzureADTokenExchange"),
			Issuer:            exampleServiceEndpointAzureEcr.WorkloadIdentityFederationIssuer,
			Subject:           exampleServiceEndpointAzureEcr.WorkloadIdentityFederationSubject,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() => 
{
    var example = new AzureDevOps.Project("example", new()
    {
        Name = "Example Project",
        Visibility = "private",
        VersionControl = "Git",
        WorkItemTemplate = "Agile",
        Description = "Managed by Pulumi",
    });
    var identity = new Azure.Core.ResourceGroup("identity", new()
    {
        Name = "identity",
        Location = "UK South",
    });
    var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
    {
        Location = identity.Location,
        Name = "example-identity",
        ResourceGroupName = identity.Name,
    });
    // azure container registry service connection
    var exampleServiceEndpointAzureEcr = new AzureDevOps.ServiceEndpointAzureEcr("example", new()
    {
        ProjectId = example.Id,
        ResourceGroup = "Example AzureCR ResourceGroup",
        ServiceEndpointName = "Example AzureCR",
        ServiceEndpointAuthenticationScheme = "WorkloadIdentityFederation",
        AzurecrSpnTenantid = "00000000-0000-0000-0000-000000000000",
        AzurecrName = "ExampleAcr",
        AzurecrSubscriptionId = "00000000-0000-0000-0000-000000000000",
        AzurecrSubscriptionName = "subscription name",
        Credentials = new AzureDevOps.Inputs.ServiceEndpointAzureEcrCredentialsArgs
        {
            Serviceprincipalid = exampleUserAssignedIdentity.ClientId,
        },
    });
    var exampleFederatedIdentityCredential = new Azure.ArmMsi.FederatedIdentityCredential("example", new()
    {
        Name = "example-federated-credential",
        ResourceGroupName = identity.Name,
        ParentId = exampleUserAssignedIdentity.Id,
        Audience = "api://AzureADTokenExchange",
        Issuer = exampleServiceEndpointAzureEcr.WorkloadIdentityFederationIssuer,
        Subject = exampleServiceEndpointAzureEcr.WorkloadIdentityFederationSubject,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.Project;
import com.pulumi.azuredevops.ProjectArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azuredevops.ServiceEndpointAzureEcr;
import com.pulumi.azuredevops.ServiceEndpointAzureEcrArgs;
import com.pulumi.azuredevops.inputs.ServiceEndpointAzureEcrCredentialsArgs;
import com.pulumi.azure.armmsi.FederatedIdentityCredential;
import com.pulumi.azure.armmsi.FederatedIdentityCredentialArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new Project("example", ProjectArgs.builder()
            .name("Example Project")
            .visibility("private")
            .versionControl("Git")
            .workItemTemplate("Agile")
            .description("Managed by Pulumi")
            .build());
        var identity = new ResourceGroup("identity", ResourceGroupArgs.builder()
            .name("identity")
            .location("UK South")
            .build());
        var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
            .location(identity.location())
            .name("example-identity")
            .resourceGroupName(identity.name())
            .build());
        // azure container registry service connection
        var exampleServiceEndpointAzureEcr = new ServiceEndpointAzureEcr("exampleServiceEndpointAzureEcr", ServiceEndpointAzureEcrArgs.builder()
            .projectId(example.id())
            .resourceGroup("Example AzureCR ResourceGroup")
            .serviceEndpointName("Example AzureCR")
            .serviceEndpointAuthenticationScheme("WorkloadIdentityFederation")
            .azurecrSpnTenantid("00000000-0000-0000-0000-000000000000")
            .azurecrName("ExampleAcr")
            .azurecrSubscriptionId("00000000-0000-0000-0000-000000000000")
            .azurecrSubscriptionName("subscription name")
            .credentials(ServiceEndpointAzureEcrCredentialsArgs.builder()
                .serviceprincipalid(exampleUserAssignedIdentity.clientId())
                .build())
            .build());
        var exampleFederatedIdentityCredential = new FederatedIdentityCredential("exampleFederatedIdentityCredential", FederatedIdentityCredentialArgs.builder()
            .name("example-federated-credential")
            .resourceGroupName(identity.name())
            .parentId(exampleUserAssignedIdentity.id())
            .audience("api://AzureADTokenExchange")
            .issuer(exampleServiceEndpointAzureEcr.workloadIdentityFederationIssuer())
            .subject(exampleServiceEndpointAzureEcr.workloadIdentityFederationSubject())
            .build());
    }
}
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
      description: Managed by Pulumi
  identity:
    type: azure:core:ResourceGroup
    properties:
      name: identity
      location: UK South
  exampleUserAssignedIdentity:
    type: azure:authorization:UserAssignedIdentity
    name: example
    properties:
      location: ${identity.location}
      name: example-identity
      resourceGroupName: ${identity.name}
  # azure container registry service connection
  exampleServiceEndpointAzureEcr:
    type: azuredevops:ServiceEndpointAzureEcr
    name: example
    properties:
      projectId: ${example.id}
      resourceGroup: Example AzureCR ResourceGroup
      serviceEndpointName: Example AzureCR
      serviceEndpointAuthenticationScheme: WorkloadIdentityFederation
      azurecrSpnTenantid: 00000000-0000-0000-0000-000000000000
      azurecrName: ExampleAcr
      azurecrSubscriptionId: 00000000-0000-0000-0000-000000000000
      azurecrSubscriptionName: subscription name
      credentials:
        serviceprincipalid: ${exampleUserAssignedIdentity.clientId}
  exampleFederatedIdentityCredential:
    type: azure:armmsi:FederatedIdentityCredential
    name: example
    properties:
      name: example-federated-credential
      resourceGroupName: ${identity.name}
      parentId: ${exampleUserAssignedIdentity.id}
      audience: api://AzureADTokenExchange
      issuer: ${exampleServiceEndpointAzureEcr.workloadIdentityFederationIssuer}
      subject: ${exampleServiceEndpointAzureEcr.workloadIdentityFederationSubject}
Relevant Links
Create ServiceEndpointAzureEcr Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceEndpointAzureEcr(name: string, args: ServiceEndpointAzureEcrArgs, opts?: CustomResourceOptions);@overload
def ServiceEndpointAzureEcr(resource_name: str,
                            args: ServiceEndpointAzureEcrArgs,
                            opts: Optional[ResourceOptions] = None)
@overload
def ServiceEndpointAzureEcr(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            azurecr_name: Optional[str] = None,
                            azurecr_spn_tenantid: Optional[str] = None,
                            azurecr_subscription_id: Optional[str] = None,
                            azurecr_subscription_name: Optional[str] = None,
                            project_id: Optional[str] = None,
                            service_endpoint_name: Optional[str] = None,
                            credentials: Optional[ServiceEndpointAzureEcrCredentialsArgs] = None,
                            description: Optional[str] = None,
                            resource_group: Optional[str] = None,
                            service_endpoint_authentication_scheme: Optional[str] = None)func NewServiceEndpointAzureEcr(ctx *Context, name string, args ServiceEndpointAzureEcrArgs, opts ...ResourceOption) (*ServiceEndpointAzureEcr, error)public ServiceEndpointAzureEcr(string name, ServiceEndpointAzureEcrArgs args, CustomResourceOptions? opts = null)
public ServiceEndpointAzureEcr(String name, ServiceEndpointAzureEcrArgs args)
public ServiceEndpointAzureEcr(String name, ServiceEndpointAzureEcrArgs args, CustomResourceOptions options)
type: azuredevops:ServiceEndpointAzureEcr
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ServiceEndpointAzureEcrArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServiceEndpointAzureEcrArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceEndpointAzureEcrArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceEndpointAzureEcrArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceEndpointAzureEcrArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var serviceEndpointAzureEcrResource = new AzureDevOps.ServiceEndpointAzureEcr("serviceEndpointAzureEcrResource", new()
{
    AzurecrName = "string",
    AzurecrSpnTenantid = "string",
    AzurecrSubscriptionId = "string",
    AzurecrSubscriptionName = "string",
    ProjectId = "string",
    ServiceEndpointName = "string",
    Credentials = new AzureDevOps.Inputs.ServiceEndpointAzureEcrCredentialsArgs
    {
        Serviceprincipalid = "string",
    },
    Description = "string",
    ResourceGroup = "string",
    ServiceEndpointAuthenticationScheme = "string",
});
example, err := azuredevops.NewServiceEndpointAzureEcr(ctx, "serviceEndpointAzureEcrResource", &azuredevops.ServiceEndpointAzureEcrArgs{
	AzurecrName:             pulumi.String("string"),
	AzurecrSpnTenantid:      pulumi.String("string"),
	AzurecrSubscriptionId:   pulumi.String("string"),
	AzurecrSubscriptionName: pulumi.String("string"),
	ProjectId:               pulumi.String("string"),
	ServiceEndpointName:     pulumi.String("string"),
	Credentials: &azuredevops.ServiceEndpointAzureEcrCredentialsArgs{
		Serviceprincipalid: pulumi.String("string"),
	},
	Description:                         pulumi.String("string"),
	ResourceGroup:                       pulumi.String("string"),
	ServiceEndpointAuthenticationScheme: pulumi.String("string"),
})
var serviceEndpointAzureEcrResource = new ServiceEndpointAzureEcr("serviceEndpointAzureEcrResource", ServiceEndpointAzureEcrArgs.builder()
    .azurecrName("string")
    .azurecrSpnTenantid("string")
    .azurecrSubscriptionId("string")
    .azurecrSubscriptionName("string")
    .projectId("string")
    .serviceEndpointName("string")
    .credentials(ServiceEndpointAzureEcrCredentialsArgs.builder()
        .serviceprincipalid("string")
        .build())
    .description("string")
    .resourceGroup("string")
    .serviceEndpointAuthenticationScheme("string")
    .build());
service_endpoint_azure_ecr_resource = azuredevops.ServiceEndpointAzureEcr("serviceEndpointAzureEcrResource",
    azurecr_name="string",
    azurecr_spn_tenantid="string",
    azurecr_subscription_id="string",
    azurecr_subscription_name="string",
    project_id="string",
    service_endpoint_name="string",
    credentials={
        "serviceprincipalid": "string",
    },
    description="string",
    resource_group="string",
    service_endpoint_authentication_scheme="string")
const serviceEndpointAzureEcrResource = new azuredevops.ServiceEndpointAzureEcr("serviceEndpointAzureEcrResource", {
    azurecrName: "string",
    azurecrSpnTenantid: "string",
    azurecrSubscriptionId: "string",
    azurecrSubscriptionName: "string",
    projectId: "string",
    serviceEndpointName: "string",
    credentials: {
        serviceprincipalid: "string",
    },
    description: "string",
    resourceGroup: "string",
    serviceEndpointAuthenticationScheme: "string",
});
type: azuredevops:ServiceEndpointAzureEcr
properties:
    azurecrName: string
    azurecrSpnTenantid: string
    azurecrSubscriptionId: string
    azurecrSubscriptionName: string
    credentials:
        serviceprincipalid: string
    description: string
    projectId: string
    resourceGroup: string
    serviceEndpointAuthenticationScheme: string
    serviceEndpointName: string
ServiceEndpointAzureEcr Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServiceEndpointAzureEcr resource accepts the following input properties:
- AzurecrName string
- The Azure container registry name.
- AzurecrSpn stringTenantid 
- The tenant id of the service principal.
- AzurecrSubscription stringId 
- The subscription id of the Azure targets.
- AzurecrSubscription stringName 
- The subscription name of the Azure targets.
- ProjectId string
- The ID of the project.
- ServiceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- Credentials
Pulumi.Azure Dev Ops. Inputs. Service Endpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- Description string
- ResourceGroup string
- The resource group to which the container registry belongs.
- ServiceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- AzurecrName string
- The Azure container registry name.
- AzurecrSpn stringTenantid 
- The tenant id of the service principal.
- AzurecrSubscription stringId 
- The subscription id of the Azure targets.
- AzurecrSubscription stringName 
- The subscription name of the Azure targets.
- ProjectId string
- The ID of the project.
- ServiceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- Credentials
ServiceEndpoint Azure Ecr Credentials Args 
- A credentialsblock as defined below.
- Description string
- ResourceGroup string
- The resource group to which the container registry belongs.
- ServiceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- azurecrName String
- The Azure container registry name.
- azurecrSpn StringTenantid 
- The tenant id of the service principal.
- azurecrSubscription StringId 
- The subscription id of the Azure targets.
- azurecrSubscription StringName 
- The subscription name of the Azure targets.
- projectId String
- The ID of the project.
- serviceEndpoint StringName 
- The name you will use to refer to this service connection in task inputs.
- credentials
ServiceEndpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- description String
- resourceGroup String
- The resource group to which the container registry belongs.
- serviceEndpoint StringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- azurecrName string
- The Azure container registry name.
- azurecrSpn stringTenantid 
- The tenant id of the service principal.
- azurecrSubscription stringId 
- The subscription id of the Azure targets.
- azurecrSubscription stringName 
- The subscription name of the Azure targets.
- projectId string
- The ID of the project.
- serviceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- credentials
ServiceEndpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- description string
- resourceGroup string
- The resource group to which the container registry belongs.
- serviceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- azurecr_name str
- The Azure container registry name.
- azurecr_spn_ strtenantid 
- The tenant id of the service principal.
- azurecr_subscription_ strid 
- The subscription id of the Azure targets.
- azurecr_subscription_ strname 
- The subscription name of the Azure targets.
- project_id str
- The ID of the project.
- service_endpoint_ strname 
- The name you will use to refer to this service connection in task inputs.
- credentials
ServiceEndpoint Azure Ecr Credentials Args 
- A credentialsblock as defined below.
- description str
- resource_group str
- The resource group to which the container registry belongs.
- service_endpoint_ strauthentication_ scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- azurecrName String
- The Azure container registry name.
- azurecrSpn StringTenantid 
- The tenant id of the service principal.
- azurecrSubscription StringId 
- The subscription id of the Azure targets.
- azurecrSubscription StringName 
- The subscription name of the Azure targets.
- projectId String
- The ID of the project.
- serviceEndpoint StringName 
- The name you will use to refer to this service connection in task inputs.
- credentials Property Map
- A credentialsblock as defined below.
- description String
- resourceGroup String
- The resource group to which the container registry belongs.
- serviceEndpoint StringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceEndpointAzureEcr resource produces the following output properties:
- AppObject stringId 
- Dictionary<string, string>
- AzSpn stringRole Assignment Id 
- AzSpn stringRole Permissions 
- Id string
- The provider-assigned unique ID for this managed resource.
- ServicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- SpnObject stringId 
- WorkloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- WorkloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- AppObject stringId 
- map[string]string
- AzSpn stringRole Assignment Id 
- AzSpn stringRole Permissions 
- Id string
- The provider-assigned unique ID for this managed resource.
- ServicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- SpnObject stringId 
- WorkloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- WorkloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject StringId 
- Map<String,String>
- azSpn StringRole Assignment Id 
- azSpn StringRole Permissions 
- id String
- The provider-assigned unique ID for this managed resource.
- servicePrincipal StringId 
- The Application(Client) ID of the Service Principal.
- spnObject StringId 
- workloadIdentity StringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity StringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject stringId 
- {[key: string]: string}
- azSpn stringRole Assignment Id 
- azSpn stringRole Permissions 
- id string
- The provider-assigned unique ID for this managed resource.
- servicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- spnObject stringId 
- workloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- app_object_ strid 
- Mapping[str, str]
- az_spn_ strrole_ assignment_ id 
- az_spn_ strrole_ permissions 
- id str
- The provider-assigned unique ID for this managed resource.
- service_principal_ strid 
- The Application(Client) ID of the Service Principal.
- spn_object_ strid 
- workload_identity_ strfederation_ issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workload_identity_ strfederation_ subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject StringId 
- Map<String>
- azSpn StringRole Assignment Id 
- azSpn StringRole Permissions 
- id String
- The provider-assigned unique ID for this managed resource.
- servicePrincipal StringId 
- The Application(Client) ID of the Service Principal.
- spnObject StringId 
- workloadIdentity StringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity StringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
Look up Existing ServiceEndpointAzureEcr Resource
Get an existing ServiceEndpointAzureEcr resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceEndpointAzureEcrState, opts?: CustomResourceOptions): ServiceEndpointAzureEcr@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_object_id: Optional[str] = None,
        authorization: Optional[Mapping[str, str]] = None,
        az_spn_role_assignment_id: Optional[str] = None,
        az_spn_role_permissions: Optional[str] = None,
        azurecr_name: Optional[str] = None,
        azurecr_spn_tenantid: Optional[str] = None,
        azurecr_subscription_id: Optional[str] = None,
        azurecr_subscription_name: Optional[str] = None,
        credentials: Optional[ServiceEndpointAzureEcrCredentialsArgs] = None,
        description: Optional[str] = None,
        project_id: Optional[str] = None,
        resource_group: Optional[str] = None,
        service_endpoint_authentication_scheme: Optional[str] = None,
        service_endpoint_name: Optional[str] = None,
        service_principal_id: Optional[str] = None,
        spn_object_id: Optional[str] = None,
        workload_identity_federation_issuer: Optional[str] = None,
        workload_identity_federation_subject: Optional[str] = None) -> ServiceEndpointAzureEcrfunc GetServiceEndpointAzureEcr(ctx *Context, name string, id IDInput, state *ServiceEndpointAzureEcrState, opts ...ResourceOption) (*ServiceEndpointAzureEcr, error)public static ServiceEndpointAzureEcr Get(string name, Input<string> id, ServiceEndpointAzureEcrState? state, CustomResourceOptions? opts = null)public static ServiceEndpointAzureEcr get(String name, Output<String> id, ServiceEndpointAzureEcrState state, CustomResourceOptions options)resources:  _:    type: azuredevops:ServiceEndpointAzureEcr    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AppObject stringId 
- Dictionary<string, string>
- AzSpn stringRole Assignment Id 
- AzSpn stringRole Permissions 
- AzurecrName string
- The Azure container registry name.
- AzurecrSpn stringTenantid 
- The tenant id of the service principal.
- AzurecrSubscription stringId 
- The subscription id of the Azure targets.
- AzurecrSubscription stringName 
- The subscription name of the Azure targets.
- Credentials
Pulumi.Azure Dev Ops. Inputs. Service Endpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- Description string
- ProjectId string
- The ID of the project.
- ResourceGroup string
- The resource group to which the container registry belongs.
- ServiceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- ServiceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- ServicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- SpnObject stringId 
- WorkloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- WorkloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- AppObject stringId 
- map[string]string
- AzSpn stringRole Assignment Id 
- AzSpn stringRole Permissions 
- AzurecrName string
- The Azure container registry name.
- AzurecrSpn stringTenantid 
- The tenant id of the service principal.
- AzurecrSubscription stringId 
- The subscription id of the Azure targets.
- AzurecrSubscription stringName 
- The subscription name of the Azure targets.
- Credentials
ServiceEndpoint Azure Ecr Credentials Args 
- A credentialsblock as defined below.
- Description string
- ProjectId string
- The ID of the project.
- ResourceGroup string
- The resource group to which the container registry belongs.
- ServiceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- ServiceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- ServicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- SpnObject stringId 
- WorkloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- WorkloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject StringId 
- Map<String,String>
- azSpn StringRole Assignment Id 
- azSpn StringRole Permissions 
- azurecrName String
- The Azure container registry name.
- azurecrSpn StringTenantid 
- The tenant id of the service principal.
- azurecrSubscription StringId 
- The subscription id of the Azure targets.
- azurecrSubscription StringName 
- The subscription name of the Azure targets.
- credentials
ServiceEndpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- description String
- projectId String
- The ID of the project.
- resourceGroup String
- The resource group to which the container registry belongs.
- serviceEndpoint StringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- serviceEndpoint StringName 
- The name you will use to refer to this service connection in task inputs.
- servicePrincipal StringId 
- The Application(Client) ID of the Service Principal.
- spnObject StringId 
- workloadIdentity StringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity StringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject stringId 
- {[key: string]: string}
- azSpn stringRole Assignment Id 
- azSpn stringRole Permissions 
- azurecrName string
- The Azure container registry name.
- azurecrSpn stringTenantid 
- The tenant id of the service principal.
- azurecrSubscription stringId 
- The subscription id of the Azure targets.
- azurecrSubscription stringName 
- The subscription name of the Azure targets.
- credentials
ServiceEndpoint Azure Ecr Credentials 
- A credentialsblock as defined below.
- description string
- projectId string
- The ID of the project.
- resourceGroup string
- The resource group to which the container registry belongs.
- serviceEndpoint stringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- serviceEndpoint stringName 
- The name you will use to refer to this service connection in task inputs.
- servicePrincipal stringId 
- The Application(Client) ID of the Service Principal.
- spnObject stringId 
- workloadIdentity stringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity stringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- app_object_ strid 
- Mapping[str, str]
- az_spn_ strrole_ assignment_ id 
- az_spn_ strrole_ permissions 
- azurecr_name str
- The Azure container registry name.
- azurecr_spn_ strtenantid 
- The tenant id of the service principal.
- azurecr_subscription_ strid 
- The subscription id of the Azure targets.
- azurecr_subscription_ strname 
- The subscription name of the Azure targets.
- credentials
ServiceEndpoint Azure Ecr Credentials Args 
- A credentialsblock as defined below.
- description str
- project_id str
- The ID of the project.
- resource_group str
- The resource group to which the container registry belongs.
- service_endpoint_ strauthentication_ scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- service_endpoint_ strname 
- The name you will use to refer to this service connection in task inputs.
- service_principal_ strid 
- The Application(Client) ID of the Service Principal.
- spn_object_ strid 
- workload_identity_ strfederation_ issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workload_identity_ strfederation_ subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
- appObject StringId 
- Map<String>
- azSpn StringRole Assignment Id 
- azSpn StringRole Permissions 
- azurecrName String
- The Azure container registry name.
- azurecrSpn StringTenantid 
- The tenant id of the service principal.
- azurecrSubscription StringId 
- The subscription id of the Azure targets.
- azurecrSubscription StringName 
- The subscription name of the Azure targets.
- credentials Property Map
- A credentialsblock as defined below.
- description String
- projectId String
- The ID of the project.
- resourceGroup String
- The resource group to which the container registry belongs.
- serviceEndpoint StringAuthentication Scheme 
- Specifies the type of azurerm endpoint, either WorkloadIdentityFederation,ManagedServiceIdentityorServicePrincipal. Defaults toServicePrincipalfor backwards compatibility.ManagedServiceIdentityhas not yet been implemented for this resource.
- serviceEndpoint StringName 
- The name you will use to refer to this service connection in task inputs.
- servicePrincipal StringId 
- The Application(Client) ID of the Service Principal.
- spnObject StringId 
- workloadIdentity StringFederation Issuer 
- The issuer if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likehttps://vstoken.dev.azure.com/00000000-0000-0000-0000-000000000000, where the GUID is the Organization ID of your Azure DevOps Organisation.
- workloadIdentity StringFederation Subject 
- The subject if service_endpoint_authentication_schemeis set toWorkloadIdentityFederation. This looks likesc://<organisation>/<project>/<service-connection-name>.
Supporting Types
ServiceEndpointAzureEcrCredentials, ServiceEndpointAzureEcrCredentialsArgs          
- Serviceprincipalid string
- The ID of the Service Principal Application.
- Serviceprincipalid string
- The ID of the Service Principal Application.
- serviceprincipalid String
- The ID of the Service Principal Application.
- serviceprincipalid string
- The ID of the Service Principal Application.
- serviceprincipalid str
- The ID of the Service Principal Application.
- serviceprincipalid String
- The ID of the Service Principal Application.
Import
Azure DevOps Azure Container Registry Service Endpoint can be imported using projectID/serviceEndpointID or projectName/serviceEndpointID
$ pulumi import azuredevops:index/serviceEndpointAzureEcr:ServiceEndpointAzureEcr example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azuredevopsTerraform Provider.