azuredevops.ServiceEndpointGenericGit

Explore with Pulumi AI

Manages a generic service endpoint within Azure DevOps, which can be used to authenticate to any external git service using basic authentication via a username and password. This is mostly useful for importing private git repositories.

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

    var exampleServiceEndpointGenericGit = new AzureDevOps.ServiceEndpointGenericGit("exampleServiceEndpointGenericGit", new()
    {
        ProjectId = exampleProject.Id,
        RepositoryUrl = "https://dev.azure.com/org/project/_git/repository",
        Username = "username",
        Password = "password",
        ServiceEndpointName = "Example Generic Git",
        Description = "Managed by Terraform",
    });

});
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.NewServiceEndpointGenericGit(ctx, "exampleServiceEndpointGenericGit", &azuredevops.ServiceEndpointGenericGitArgs{
			ProjectId:           exampleProject.ID(),
			RepositoryUrl:       pulumi.String("https://dev.azure.com/org/project/_git/repository"),
			Username:            pulumi.String("username"),
			Password:            pulumi.String("password"),
			ServiceEndpointName: pulumi.String("Example Generic Git"),
			Description:         pulumi.String("Managed by Terraform"),
		})
		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.ServiceEndpointGenericGit;
import com.pulumi.azuredevops.ServiceEndpointGenericGitArgs;
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 exampleServiceEndpointGenericGit = new ServiceEndpointGenericGit("exampleServiceEndpointGenericGit", ServiceEndpointGenericGitArgs.builder()        
            .projectId(exampleProject.id())
            .repositoryUrl("https://dev.azure.com/org/project/_git/repository")
            .username("username")
            .password("password")
            .serviceEndpointName("Example Generic Git")
            .description("Managed by Terraform")
            .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")
example_service_endpoint_generic_git = azuredevops.ServiceEndpointGenericGit("exampleServiceEndpointGenericGit",
    project_id=example_project.id,
    repository_url="https://dev.azure.com/org/project/_git/repository",
    username="username",
    password="password",
    service_endpoint_name="Example Generic Git",
    description="Managed by Terraform")
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",
});
const exampleServiceEndpointGenericGit = new azuredevops.ServiceEndpointGenericGit("exampleServiceEndpointGenericGit", {
    projectId: exampleProject.id,
    repositoryUrl: "https://dev.azure.com/org/project/_git/repository",
    username: "username",
    password: "password",
    serviceEndpointName: "Example Generic Git",
    description: "Managed by Terraform",
});
resources:
  exampleProject:
    type: azuredevops:Project
    properties:
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
      description: Managed by Terraform
  exampleServiceEndpointGenericGit:
    type: azuredevops:ServiceEndpointGenericGit
    properties:
      projectId: ${exampleProject.id}
      repositoryUrl: https://dev.azure.com/org/project/_git/repository
      username: username
      password: password
      serviceEndpointName: Example Generic Git
      description: Managed by Terraform

Create ServiceEndpointGenericGit Resource

new ServiceEndpointGenericGit(name: string, args: ServiceEndpointGenericGitArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointGenericGit(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              authorization: Optional[Mapping[str, str]] = None,
                              description: Optional[str] = None,
                              enable_pipelines_access: Optional[bool] = None,
                              password: Optional[str] = None,
                              project_id: Optional[str] = None,
                              repository_url: Optional[str] = None,
                              service_endpoint_name: Optional[str] = None,
                              username: Optional[str] = None)
@overload
def ServiceEndpointGenericGit(resource_name: str,
                              args: ServiceEndpointGenericGitArgs,
                              opts: Optional[ResourceOptions] = None)
func NewServiceEndpointGenericGit(ctx *Context, name string, args ServiceEndpointGenericGitArgs, opts ...ResourceOption) (*ServiceEndpointGenericGit, error)
public ServiceEndpointGenericGit(string name, ServiceEndpointGenericGitArgs args, CustomResourceOptions? opts = null)
public ServiceEndpointGenericGit(String name, ServiceEndpointGenericGitArgs args)
public ServiceEndpointGenericGit(String name, ServiceEndpointGenericGitArgs args, CustomResourceOptions options)
type: azuredevops:ServiceEndpointGenericGit
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ServiceEndpointGenericGitArgs
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 ServiceEndpointGenericGitArgs
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 ServiceEndpointGenericGitArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceEndpointGenericGitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ServiceEndpointGenericGitArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ServiceEndpointGenericGit 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 ServiceEndpointGenericGit resource accepts the following input properties:

ProjectId string

The ID of the project.

RepositoryUrl string

The URL of the repository associated with the service endpoint.

ServiceEndpointName string

The name of the service endpoint.

Authorization Dictionary<string, string>
Description string
EnablePipelinesAccess bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

Password string

The PAT or password used to authenticate to the git repository.

Username string

The username used to authenticate to the git repository.

ProjectId string

The ID of the project.

RepositoryUrl string

The URL of the repository associated with the service endpoint.

ServiceEndpointName string

The name of the service endpoint.

Authorization map[string]string
Description string
EnablePipelinesAccess bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

Password string

The PAT or password used to authenticate to the git repository.

Username string

The username used to authenticate to the git repository.

projectId String

The ID of the project.

repositoryUrl String

The URL of the repository associated with the service endpoint.

serviceEndpointName String

The name of the service endpoint.

authorization Map<String,String>
description String
enablePipelinesAccess Boolean

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password String

The PAT or password used to authenticate to the git repository.

username String

The username used to authenticate to the git repository.

projectId string

The ID of the project.

repositoryUrl string

The URL of the repository associated with the service endpoint.

serviceEndpointName string

The name of the service endpoint.

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

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password string

The PAT or password used to authenticate to the git repository.

username string

The username used to authenticate to the git repository.

project_id str

The ID of the project.

repository_url str

The URL of the repository associated with the service endpoint.

service_endpoint_name str

The name of the service endpoint.

authorization Mapping[str, str]
description str
enable_pipelines_access bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password str

The PAT or password used to authenticate to the git repository.

username str

The username used to authenticate to the git repository.

projectId String

The ID of the project.

repositoryUrl String

The URL of the repository associated with the service endpoint.

serviceEndpointName String

The name of the service endpoint.

authorization Map<String>
description String
enablePipelinesAccess Boolean

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password String

The PAT or password used to authenticate to the git repository.

username String

The username used to authenticate to the git repository.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

PasswordHash string

A bcrypted hash of the attribute 'password'

Id string

The provider-assigned unique ID for this managed resource.

PasswordHash string

A bcrypted hash of the attribute 'password'

id String

The provider-assigned unique ID for this managed resource.

passwordHash String

A bcrypted hash of the attribute 'password'

id string

The provider-assigned unique ID for this managed resource.

passwordHash string

A bcrypted hash of the attribute 'password'

id str

The provider-assigned unique ID for this managed resource.

password_hash str

A bcrypted hash of the attribute 'password'

id String

The provider-assigned unique ID for this managed resource.

passwordHash String

A bcrypted hash of the attribute 'password'

Look up Existing ServiceEndpointGenericGit Resource

Get an existing ServiceEndpointGenericGit 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?: ServiceEndpointGenericGitState, opts?: CustomResourceOptions): ServiceEndpointGenericGit
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authorization: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        enable_pipelines_access: Optional[bool] = None,
        password: Optional[str] = None,
        password_hash: Optional[str] = None,
        project_id: Optional[str] = None,
        repository_url: Optional[str] = None,
        service_endpoint_name: Optional[str] = None,
        username: Optional[str] = None) -> ServiceEndpointGenericGit
func GetServiceEndpointGenericGit(ctx *Context, name string, id IDInput, state *ServiceEndpointGenericGitState, opts ...ResourceOption) (*ServiceEndpointGenericGit, error)
public static ServiceEndpointGenericGit Get(string name, Input<string> id, ServiceEndpointGenericGitState? state, CustomResourceOptions? opts = null)
public static ServiceEndpointGenericGit get(String name, Output<String> id, ServiceEndpointGenericGitState 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:
Authorization Dictionary<string, string>
Description string
EnablePipelinesAccess bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

Password string

The PAT or password used to authenticate to the git repository.

PasswordHash string

A bcrypted hash of the attribute 'password'

ProjectId string

The ID of the project.

RepositoryUrl string

The URL of the repository associated with the service endpoint.

ServiceEndpointName string

The name of the service endpoint.

Username string

The username used to authenticate to the git repository.

Authorization map[string]string
Description string
EnablePipelinesAccess bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

Password string

The PAT or password used to authenticate to the git repository.

PasswordHash string

A bcrypted hash of the attribute 'password'

ProjectId string

The ID of the project.

RepositoryUrl string

The URL of the repository associated with the service endpoint.

ServiceEndpointName string

The name of the service endpoint.

Username string

The username used to authenticate to the git repository.

authorization Map<String,String>
description String
enablePipelinesAccess Boolean

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password String

The PAT or password used to authenticate to the git repository.

passwordHash String

A bcrypted hash of the attribute 'password'

projectId String

The ID of the project.

repositoryUrl String

The URL of the repository associated with the service endpoint.

serviceEndpointName String

The name of the service endpoint.

username String

The username used to authenticate to the git repository.

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

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password string

The PAT or password used to authenticate to the git repository.

passwordHash string

A bcrypted hash of the attribute 'password'

projectId string

The ID of the project.

repositoryUrl string

The URL of the repository associated with the service endpoint.

serviceEndpointName string

The name of the service endpoint.

username string

The username used to authenticate to the git repository.

authorization Mapping[str, str]
description str
enable_pipelines_access bool

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password str

The PAT or password used to authenticate to the git repository.

password_hash str

A bcrypted hash of the attribute 'password'

project_id str

The ID of the project.

repository_url str

The URL of the repository associated with the service endpoint.

service_endpoint_name str

The name of the service endpoint.

username str

The username used to authenticate to the git repository.

authorization Map<String>
description String
enablePipelinesAccess Boolean

A value indicating whether or not to attempt accessing this git server from Azure Pipelines.

password String

The PAT or password used to authenticate to the git repository.

passwordHash String

A bcrypted hash of the attribute 'password'

projectId String

The ID of the project.

repositoryUrl String

The URL of the repository associated with the service endpoint.

serviceEndpointName String

The name of the service endpoint.

username String

The username used to authenticate to the git repository.

Import

Azure DevOps Service Endpoint Generic Git can be imported using projectID/serviceEndpointID or projectName/serviceEndpointID

 $ pulumi import azuredevops:index/serviceEndpointGenericGit:ServiceEndpointGenericGit 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.