azuredevops.ServiceEndpointAzureEcr

Explore with Pulumi AI

Manages a Azure Container Registry service endpoint within Azure DevOps.

Example Usage

using System.Collections.Generic;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var exampleProject = new AzureDevOps.Project("exampleProject", new()
    {
        Visibility = "private",
        VersionControl = "Git",
        WorkItemTemplate = "Agile",
        Description = "Managed by Terraform",
    });

    // azure container registry service connection
    var exampleServiceEndpointAzureEcr = new AzureDevOps.ServiceEndpointAzureEcr("exampleServiceEndpointAzureEcr", new()
    {
        ProjectId = exampleProject.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 main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", &azuredevops.ProjectArgs{
			Visibility:       pulumi.String("private"),
			VersionControl:   pulumi.String("Git"),
			WorkItemTemplate: pulumi.String("Agile"),
			Description:      pulumi.String("Managed by Terraform"),
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewServiceEndpointAzureEcr(ctx, "exampleServiceEndpointAzureEcr", &azuredevops.ServiceEndpointAzureEcrArgs{
			ProjectId:               exampleProject.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
	})
}
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 exampleProject = new Project("exampleProject", ProjectArgs.builder()        
            .visibility("private")
            .versionControl("Git")
            .workItemTemplate("Agile")
            .description("Managed by Terraform")
            .build());

        var exampleServiceEndpointAzureEcr = new ServiceEndpointAzureEcr("exampleServiceEndpointAzureEcr", ServiceEndpointAzureEcrArgs.builder()        
            .projectId(exampleProject.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());

    }
}
import pulumi
import pulumi_azuredevops as azuredevops

example_project = azuredevops.Project("exampleProject",
    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("exampleServiceEndpointAzureEcr",
    project_id=example_project.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")
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const exampleProject = new azuredevops.Project("exampleProject", {
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
    description: "Managed by Terraform",
});
// azure container registry service connection
const exampleServiceEndpointAzureEcr = new azuredevops.ServiceEndpointAzureEcr("exampleServiceEndpointAzureEcr", {
    projectId: exampleProject.id,
    serviceEndpointName: "Example AzureCR",
    resourceGroup: "example-rg",
    azurecrSpnTenantid: "00000000-0000-0000-0000-000000000000",
    azurecrName: "ExampleAcr",
    azurecrSubscriptionId: "00000000-0000-0000-0000-000000000000",
    azurecrSubscriptionName: "subscription name",
});
resources:
  exampleProject:
    type: azuredevops:Project
    properties:
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
      description: Managed by Terraform
  # azure container registry service connection
  exampleServiceEndpointAzureEcr:
    type: azuredevops:ServiceEndpointAzureEcr
    properties:
      projectId: ${exampleProject.id}
      serviceEndpointName: Example AzureCR
      resourceGroup: example-rg
      azurecrSpnTenantid: 00000000-0000-0000-0000-000000000000
      azurecrName: ExampleAcr
      azurecrSubscriptionId: 00000000-0000-0000-0000-000000000000
      azurecrSubscriptionName: subscription name

Create ServiceEndpointAzureEcr Resource

new ServiceEndpointAzureEcr(name: string, args: ServiceEndpointAzureEcrArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointAzureEcr(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            authorization: Optional[Mapping[str, 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,
                            description: Optional[str] = None,
                            project_id: Optional[str] = None,
                            resource_group: Optional[str] = None,
                            service_endpoint_name: Optional[str] = None)
@overload
def ServiceEndpointAzureEcr(resource_name: str,
                            args: ServiceEndpointAzureEcrArgs,
                            opts: Optional[ResourceOptions] = 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.

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.

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

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.

ResourceGroup string

The resource group to which the container registry belongs.

ServiceEndpointName string

The name you will use to refer to this service connection in task inputs.

Authorization Dictionary<string, string>
Description 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.

ProjectId string

The ID of the project.

ResourceGroup string

The resource group to which the container registry belongs.

ServiceEndpointName string

The name you will use to refer to this service connection in task inputs.

Authorization map[string]string
Description 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.

projectId String

The ID of the project.

resourceGroup String

The resource group to which the container registry belongs.

serviceEndpointName String

The name you will use to refer to this service connection in task inputs.

authorization Map<String,String>
description 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.

projectId string

The ID of the project.

resourceGroup string

The resource group to which the container registry belongs.

serviceEndpointName string

The name you will use to refer to this service connection in task inputs.

authorization {[key: string]: string}
description string
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.

resource_group str

The resource group to which the container registry belongs.

service_endpoint_name str

The name you will use to refer to this service connection in task inputs.

authorization Mapping[str, str]
description str
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.

resourceGroup String

The resource group to which the container registry belongs.

serviceEndpointName String

The name you will use to refer to this service connection in task inputs.

authorization Map<String>
description String

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
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
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
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
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
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

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,
        description: Optional[str] = None,
        project_id: Optional[str] = None,
        resource_group: Optional[str] = None,
        service_endpoint_name: Optional[str] = None,
        service_principal_id: Optional[str] = None,
        spn_object_id: 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.

Description string
ProjectId string

The ID of the project.

ResourceGroup string

The resource group to which the container registry belongs.

ServiceEndpointName string

The name you will use to refer to this service connection in task inputs.

ServicePrincipalId string

The service principal ID.

SpnObjectId string
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.

Description string
ProjectId string

The ID of the project.

ResourceGroup string

The resource group to which the container registry belongs.

ServiceEndpointName string

The name you will use to refer to this service connection in task inputs.

ServicePrincipalId string

The service principal ID.

SpnObjectId string
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.

description String
projectId String

The ID of the project.

resourceGroup String

The resource group to which the container registry belongs.

serviceEndpointName String

The name you will use to refer to this service connection in task inputs.

servicePrincipalId String

The service principal ID.

spnObjectId String
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.

description string
projectId string

The ID of the project.

resourceGroup string

The resource group to which the container registry belongs.

serviceEndpointName string

The name you will use to refer to this service connection in task inputs.

servicePrincipalId string

The service principal ID.

spnObjectId string
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.

description str
project_id str

The ID of the project.

resource_group str

The resource group to which the container registry belongs.

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
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.

description String
projectId String

The ID of the project.

resourceGroup String

The resource group to which the container registry belongs.

serviceEndpointName String

The name you will use to refer to this service connection in task inputs.

servicePrincipalId String

The service principal ID.

spnObjectId String

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

Package Details

Repository
Azure DevOps pulumi/pulumi-azuredevops
License
Apache-2.0
Notes

This Pulumi package is based on the azuredevops Terraform Provider.