1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. ServiceEndpointAzureEcr
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

azuredevops.ServiceEndpointAzureEcr

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

    Manages a Azure Container Registry service endpoint within Azure DevOps.

    Example Usage

    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 Terraform",
    });
    // 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 Terraform")
    # 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 Terraform"),
    		})
    		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 Terraform",
        });
    
        // 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 Terraform")
                .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 Terraform
      # 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
    

    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 Terraform",
    });
    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 Terraform")
    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 Terraform"),
    		})
    		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 Terraform",
        });
    
        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 Terraform")
                .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 Terraform
      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}
    

    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,
                                authorization: Optional[Mapping[str, 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",
        Authorization = 
        {
            { "string", "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"),
    	Authorization: pulumi.StringMap{
    		"string": 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")
        .authorization(Map.of("string", "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",
        authorization={
            "string": "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",
        authorization: {
            string: "string",
        },
        credentials: {
            serviceprincipalid: "string",
        },
        description: "string",
        resourceGroup: "string",
        serviceEndpointAuthenticationScheme: "string",
    });
    
    type: azuredevops:ServiceEndpointAzureEcr
    properties:
        authorization:
            string: string
        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.
    AzurecrSpnTenantid string
    The tenant id of the service principal.
    AzurecrSubscriptionId string
    The subscription id of the Azure targets.
    AzurecrSubscriptionName string
    The subscription name of the Azure targets.
    ProjectId string
    The ID of the project.
    ServiceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    Authorization Dictionary<string, string>
    Credentials Pulumi.AzureDevOps.Inputs.ServiceEndpointAzureEcrCredentials
    A credentials block.
    Description string
    ResourceGroup string
    The resource group to which the container registry belongs.
    ServiceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    AzurecrName string
    The Azure container registry name.
    AzurecrSpnTenantid string
    The tenant id of the service principal.
    AzurecrSubscriptionId string
    The subscription id of the Azure targets.
    AzurecrSubscriptionName string
    The subscription name of the Azure targets.
    ProjectId string
    The ID of the project.
    ServiceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    Authorization map[string]string
    Credentials ServiceEndpointAzureEcrCredentialsArgs
    A credentials block.
    Description string
    ResourceGroup string
    The resource group to which the container registry belongs.
    ServiceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    azurecrName String
    The Azure container registry name.
    azurecrSpnTenantid String
    The tenant id of the service principal.
    azurecrSubscriptionId String
    The subscription id of the Azure targets.
    azurecrSubscriptionName String
    The subscription name of the Azure targets.
    projectId String
    The ID of the project.
    serviceEndpointName String
    The name you will use to refer to this service connection in task inputs.
    authorization Map<String,String>
    credentials ServiceEndpointAzureEcrCredentials
    A credentials block.
    description String
    resourceGroup String
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme String
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    azurecrName string
    The Azure container registry name.
    azurecrSpnTenantid string
    The tenant id of the service principal.
    azurecrSubscriptionId string
    The subscription id of the Azure targets.
    azurecrSubscriptionName string
    The subscription name of the Azure targets.
    projectId string
    The ID of the project.
    serviceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    authorization {[key: string]: string}
    credentials ServiceEndpointAzureEcrCredentials
    A credentials block.
    description string
    resourceGroup string
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    azurecr_name str
    The Azure container registry name.
    azurecr_spn_tenantid str
    The tenant id of the service principal.
    azurecr_subscription_id str
    The subscription id of the Azure targets.
    azurecr_subscription_name str
    The subscription name of the Azure targets.
    project_id str
    The ID of the project.
    service_endpoint_name str
    The name you will use to refer to this service connection in task inputs.
    authorization Mapping[str, str]
    credentials ServiceEndpointAzureEcrCredentialsArgs
    A credentials block.
    description str
    resource_group str
    The resource group to which the container registry belongs.
    service_endpoint_authentication_scheme str
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    azurecrName String
    The Azure container registry name.
    azurecrSpnTenantid String
    The tenant id of the service principal.
    azurecrSubscriptionId String
    The subscription id of the Azure targets.
    azurecrSubscriptionName String
    The subscription name of the Azure targets.
    projectId String
    The ID of the project.
    serviceEndpointName String
    The name you will use to refer to this service connection in task inputs.
    authorization Map<String>
    credentials Property Map
    A credentials block.
    description String
    resourceGroup String
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme String
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has 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:

    AppObjectId string
    AzSpnRoleAssignmentId string
    AzSpnRolePermissions string
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    The service principal ID.
    SpnObjectId string
    WorkloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    WorkloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    AppObjectId string
    AzSpnRoleAssignmentId string
    AzSpnRolePermissions string
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    The service principal ID.
    SpnObjectId string
    WorkloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    WorkloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    appObjectId String
    azSpnRoleAssignmentId String
    azSpnRolePermissions String
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    The service principal ID.
    spnObjectId String
    workloadIdentityFederationIssuer String
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject String
    The subject of the workload identity federation service principal.
    appObjectId string
    azSpnRoleAssignmentId string
    azSpnRolePermissions string
    id string
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId string
    The service principal ID.
    spnObjectId string
    workloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    app_object_id str
    az_spn_role_assignment_id str
    az_spn_role_permissions str
    id str
    The provider-assigned unique ID for this managed resource.
    service_principal_id str
    The service principal ID.
    spn_object_id str
    workload_identity_federation_issuer str
    The issuer of the workload identity federation service principal.
    workload_identity_federation_subject str
    The subject of the workload identity federation service principal.
    appObjectId String
    azSpnRoleAssignmentId String
    azSpnRolePermissions String
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    The service principal ID.
    spnObjectId String
    workloadIdentityFederationIssuer String
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject String
    The subject of the workload identity federation service principal.

    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) -> ServiceEndpointAzureEcr
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AppObjectId string
    Authorization Dictionary<string, string>
    AzSpnRoleAssignmentId string
    AzSpnRolePermissions string
    AzurecrName string
    The Azure container registry name.
    AzurecrSpnTenantid string
    The tenant id of the service principal.
    AzurecrSubscriptionId string
    The subscription id of the Azure targets.
    AzurecrSubscriptionName string
    The subscription name of the Azure targets.
    Credentials Pulumi.AzureDevOps.Inputs.ServiceEndpointAzureEcrCredentials
    A credentials block.
    Description string
    ProjectId string
    The ID of the project.
    ResourceGroup string
    The resource group to which the container registry belongs.
    ServiceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    ServiceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    ServicePrincipalId string
    The service principal ID.
    SpnObjectId string
    WorkloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    WorkloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    AppObjectId string
    Authorization map[string]string
    AzSpnRoleAssignmentId string
    AzSpnRolePermissions string
    AzurecrName string
    The Azure container registry name.
    AzurecrSpnTenantid string
    The tenant id of the service principal.
    AzurecrSubscriptionId string
    The subscription id of the Azure targets.
    AzurecrSubscriptionName string
    The subscription name of the Azure targets.
    Credentials ServiceEndpointAzureEcrCredentialsArgs
    A credentials block.
    Description string
    ProjectId string
    The ID of the project.
    ResourceGroup string
    The resource group to which the container registry belongs.
    ServiceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    ServiceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    ServicePrincipalId string
    The service principal ID.
    SpnObjectId string
    WorkloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    WorkloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    appObjectId String
    authorization Map<String,String>
    azSpnRoleAssignmentId String
    azSpnRolePermissions String
    azurecrName String
    The Azure container registry name.
    azurecrSpnTenantid String
    The tenant id of the service principal.
    azurecrSubscriptionId String
    The subscription id of the Azure targets.
    azurecrSubscriptionName String
    The subscription name of the Azure targets.
    credentials ServiceEndpointAzureEcrCredentials
    A credentials block.
    description String
    projectId String
    The ID of the project.
    resourceGroup String
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme String
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    serviceEndpointName String
    The name you will use to refer to this service connection in task inputs.
    servicePrincipalId String
    The service principal ID.
    spnObjectId String
    workloadIdentityFederationIssuer String
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject String
    The subject of the workload identity federation service principal.
    appObjectId string
    authorization {[key: string]: string}
    azSpnRoleAssignmentId string
    azSpnRolePermissions string
    azurecrName string
    The Azure container registry name.
    azurecrSpnTenantid string
    The tenant id of the service principal.
    azurecrSubscriptionId string
    The subscription id of the Azure targets.
    azurecrSubscriptionName string
    The subscription name of the Azure targets.
    credentials ServiceEndpointAzureEcrCredentials
    A credentials block.
    description string
    projectId string
    The ID of the project.
    resourceGroup string
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme string
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    serviceEndpointName string
    The name you will use to refer to this service connection in task inputs.
    servicePrincipalId string
    The service principal ID.
    spnObjectId string
    workloadIdentityFederationIssuer string
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject string
    The subject of the workload identity federation service principal.
    app_object_id str
    authorization Mapping[str, str]
    az_spn_role_assignment_id str
    az_spn_role_permissions str
    azurecr_name str
    The Azure container registry name.
    azurecr_spn_tenantid str
    The tenant id of the service principal.
    azurecr_subscription_id str
    The subscription id of the Azure targets.
    azurecr_subscription_name str
    The subscription name of the Azure targets.
    credentials ServiceEndpointAzureEcrCredentialsArgs
    A credentials block.
    description str
    project_id str
    The ID of the project.
    resource_group str
    The resource group to which the container registry belongs.
    service_endpoint_authentication_scheme str
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    service_endpoint_name str
    The name you will use to refer to this service connection in task inputs.
    service_principal_id str
    The service principal ID.
    spn_object_id str
    workload_identity_federation_issuer str
    The issuer of the workload identity federation service principal.
    workload_identity_federation_subject str
    The subject of the workload identity federation service principal.
    appObjectId String
    authorization Map<String>
    azSpnRoleAssignmentId String
    azSpnRolePermissions String
    azurecrName String
    The Azure container registry name.
    azurecrSpnTenantid String
    The tenant id of the service principal.
    azurecrSubscriptionId String
    The subscription id of the Azure targets.
    azurecrSubscriptionName String
    The subscription name of the Azure targets.
    credentials Property Map
    A credentials block.
    description String
    projectId String
    The ID of the project.
    resourceGroup String
    The resource group to which the container registry belongs.
    serviceEndpointAuthenticationScheme String
    Specifies the type of azurerm endpoint, either WorkloadIdentityFederation, ManagedServiceIdentity or ServicePrincipal. Defaults to ServicePrincipal for backwards compatibility. ManagedServiceIdentity has not yet been implemented for this resource.
    serviceEndpointName String
    The name you will use to refer to this service connection in task inputs.
    servicePrincipalId String
    The service principal ID.
    spnObjectId String
    workloadIdentityFederationIssuer String
    The issuer of the workload identity federation service principal.
    workloadIdentityFederationSubject String
    The subject of the workload identity federation service principal.

    Supporting Types

    ServiceEndpointAzureEcrCredentials, ServiceEndpointAzureEcrCredentialsArgs

    Serviceprincipalid string
    The service principal application Id
    Serviceprincipalid string
    The service principal application Id
    serviceprincipalid String
    The service principal application Id
    serviceprincipalid string
    The service principal application Id
    serviceprincipalid str
    The service principal application Id
    serviceprincipalid String
    The service principal application Id

    Import

    Azure DevOps Service Endpoint Azure Container Registry 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 azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi