DockerRegistry

Manages a Docker Registry service endpoint within Azure DevOps.

Example Usage

using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

class MyStack : Stack
{
    public MyStack()
    {
        var project = new AzureDevOps.Core.Project("project", new AzureDevOps.Core.ProjectArgs
        {
            ProjectName = "Sample Project",
            Visibility = "private",
            VersionControl = "Git",
            WorkItemTemplate = "Agile",
        });
        // dockerhub registry service connection
        var dockerhubregistry = new AzureDevOps.ServiceEndpoint.DockerRegistry("dockerhubregistry", new AzureDevOps.ServiceEndpoint.DockerRegistryArgs
        {
            ProjectId = project.Id,
            ServiceEndpointName = "Sample Docker Hub",
            DockerUsername = "sample",
            DockerEmail = "email@example.com",
            DockerPassword = "12345",
            RegistryType = "DockerHub",
        });
        // other docker registry service connection
        var otherregistry = new AzureDevOps.ServiceEndpoint.DockerRegistry("otherregistry", new AzureDevOps.ServiceEndpoint.DockerRegistryArgs
        {
            ProjectId = project.Id,
            ServiceEndpointName = "Sample Docker Registry",
            DockerRegistry = "https://sample.azurecr.io/v1",
            DockerUsername = "sample",
            DockerPassword = "12345",
            RegistryType = "Others",
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        project, err := Core.NewProject(ctx, "project", &Core.ProjectArgs{
            ProjectName:      pulumi.String("Sample Project"),
            Visibility:       pulumi.String("private"),
            VersionControl:   pulumi.String("Git"),
            WorkItemTemplate: pulumi.String("Agile"),
        })
        if err != nil {
            return err
        }
        dockerhubregistry, err := ServiceEndpoint.NewDockerRegistry(ctx, "dockerhubregistry", &ServiceEndpoint.DockerRegistryArgs{
            ProjectId:           project.ID(),
            ServiceEndpointName: pulumi.String("Sample Docker Hub"),
            DockerUsername:      pulumi.String("sample"),
            DockerEmail:         pulumi.String("email@example.com"),
            DockerPassword:      pulumi.String("12345"),
            RegistryType:        pulumi.String("DockerHub"),
        })
        if err != nil {
            return err
        }
        otherregistry, err := ServiceEndpoint.NewDockerRegistry(ctx, "otherregistry", &ServiceEndpoint.DockerRegistryArgs{
            ProjectId:           project.ID(),
            ServiceEndpointName: pulumi.String("Sample Docker Registry"),
            DockerRegistry:      pulumi.String("https://sample.azurecr.io/v1"),
            DockerUsername:      pulumi.String("sample"),
            DockerPassword:      pulumi.String("12345"),
            RegistryType:        pulumi.String("Others"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azuredevops as azuredevops

project = azuredevops.core.Project("project",
    project_name="Sample Project",
    visibility="private",
    version_control="Git",
    work_item_template="Agile")
# dockerhub registry service connection
dockerhubregistry = azuredevops.service_endpoint.DockerRegistry("dockerhubregistry",
    project_id=project.id,
    service_endpoint_name="Sample Docker Hub",
    docker_username="sample",
    docker_email="email@example.com",
    docker_password="12345",
    registry_type="DockerHub")
# other docker registry service connection
otherregistry = azuredevops.service_endpoint.DockerRegistry("otherregistry",
    project_id=project.id,
    service_endpoint_name="Sample Docker Registry",
    docker_registry="https://sample.azurecr.io/v1",
    docker_username="sample",
    docker_password="12345",
    registry_type="Others")
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const project = new azuredevops.Core.Project("project", {
    projectName: "Sample Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
});
// dockerhub registry service connection
const dockerhubregistry = new azuredevops.ServiceEndpoint.DockerRegistry("dockerhubregistry", {
    projectId: project.id,
    serviceEndpointName: "Sample Docker Hub",
    dockerUsername: "sample",
    dockerEmail: "email@example.com",
    dockerPassword: "12345",
    registryType: "DockerHub",
});
// other docker registry service connection
const otherregistry = new azuredevops.ServiceEndpoint.DockerRegistry("otherregistry", {
    projectId: project.id,
    serviceEndpointName: "Sample Docker Registry",
    dockerRegistry: "https://sample.azurecr.io/v1",
    dockerUsername: "sample",
    dockerPassword: "12345",
    registryType: "Others",
});

Create a DockerRegistry Resource

def DockerRegistry(resource_name, opts=None, authorization=None, description=None, docker_email=None, docker_password=None, docker_registry=None, docker_username=None, project_id=None, registry_type=None, service_endpoint_name=None, __props__=None);
name string
The unique name of the resource.
args DockerRegistryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DockerRegistryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DockerRegistryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DockerRegistry Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DockerRegistry resource accepts the following input properties:

DockerRegistryUrl string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

ProjectId string

The project ID or project name.

RegistryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

ServiceEndpointName string

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

Authorization Dictionary<string, string>
Description string

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

DockerEmail string

The email for Docker account user.

DockerPassword string

The password for the account user identified above.

DockerUsername string

The identifier of the Docker account user.

DockerRegistry string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

ProjectId string

The project ID or project name.

RegistryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

ServiceEndpointName string

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

Authorization map[string]string
Description string

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

DockerEmail string

The email for Docker account user.

DockerPassword string

The password for the account user identified above.

DockerUsername string

The identifier of the Docker account user.

dockerRegistry string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

projectId string

The project ID or project name.

registryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

serviceEndpointName string

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

authorization {[key: string]: string}
description string

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

dockerEmail string

The email for Docker account user.

dockerPassword string

The password for the account user identified above.

dockerUsername string

The identifier of the Docker account user.

docker_registry str

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

project_id str

The project ID or project name.

registry_type str

Can be “DockerHub” or “Others” (Default “DockerHub”)

service_endpoint_name str

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

authorization Dict[str, str]
description str

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

docker_email str

The email for Docker account user.

docker_password str

The password for the account user identified above.

docker_username str

The identifier of the Docker account user.

Outputs

All input properties are implicitly available as output properties. Additionally, the DockerRegistry resource produces the following output properties:

DockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

Id string
The provider-assigned unique ID for this managed resource.
DockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

Id string
The provider-assigned unique ID for this managed resource.
dockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

id string
The provider-assigned unique ID for this managed resource.
docker_password_hash str

A bcrypted hash of the attribute ‘docker_password’

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DockerRegistry Resource

Get an existing DockerRegistry 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?: DockerRegistryState, opts?: CustomResourceOptions): DockerRegistry
static get(resource_name, id, opts=None, authorization=None, description=None, docker_email=None, docker_password=None, docker_password_hash=None, docker_registry=None, docker_username=None, project_id=None, registry_type=None, service_endpoint_name=None, __props__=None);
func GetDockerRegistry(ctx *Context, name string, id IDInput, state *DockerRegistryState, opts ...ResourceOption) (*DockerRegistry, error)
public static DockerRegistry Get(string name, Input<string> id, DockerRegistryState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Authorization Dictionary<string, string>
Description string

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

DockerEmail string

The email for Docker account user.

DockerPassword string

The password for the account user identified above.

DockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

DockerRegistryUrl string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

DockerUsername string

The identifier of the Docker account user.

ProjectId string

The project ID or project name.

RegistryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

ServiceEndpointName string

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

Authorization map[string]string
Description string

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

DockerEmail string

The email for Docker account user.

DockerPassword string

The password for the account user identified above.

DockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

DockerRegistry string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

DockerUsername string

The identifier of the Docker account user.

ProjectId string

The project ID or project name.

RegistryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

ServiceEndpointName string

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

authorization {[key: string]: string}
description string

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

dockerEmail string

The email for Docker account user.

dockerPassword string

The password for the account user identified above.

dockerPasswordHash string

A bcrypted hash of the attribute ‘docker_password’

dockerRegistry string

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

dockerUsername string

The identifier of the Docker account user.

projectId string

The project ID or project name.

registryType string

Can be “DockerHub” or “Others” (Default “DockerHub”)

serviceEndpointName string

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

authorization Dict[str, str]
description str

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

docker_email str

The email for Docker account user.

docker_password str

The password for the account user identified above.

docker_password_hash str

A bcrypted hash of the attribute ‘docker_password’

docker_registry str

The URL of the Docker registry. (Default: “https://index.docker.io/v1/")

docker_username str

The identifier of the Docker account user.

project_id str

The project ID or project name.

registry_type str

Can be “DockerHub” or “Others” (Default “DockerHub”)

service_endpoint_name str

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

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.