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
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",
});
const exampleServiceEndpointGenericGit = new azuredevops.ServiceEndpointGenericGit("example", {
projectId: example.id,
repositoryUrl: "https://dev.azure.com/org/project/_git/repository",
username: "username",
password: "password",
serviceEndpointName: "Example Generic Git",
description: "Managed by Terraform",
});
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")
example_service_endpoint_generic_git = azuredevops.ServiceEndpointGenericGit("example",
project_id=example.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")
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
}
_, err = azuredevops.NewServiceEndpointGenericGit(ctx, "example", &azuredevops.ServiceEndpointGenericGitArgs{
ProjectId: example.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
})
}
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",
});
var exampleServiceEndpointGenericGit = new AzureDevOps.ServiceEndpointGenericGit("example", new()
{
ProjectId = example.Id,
RepositoryUrl = "https://dev.azure.com/org/project/_git/repository",
Username = "username",
Password = "password",
ServiceEndpointName = "Example Generic Git",
Description = "Managed by Terraform",
});
});
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 example = new Project("example", ProjectArgs.builder()
.name("Example Project")
.visibility("private")
.versionControl("Git")
.workItemTemplate("Agile")
.description("Managed by Terraform")
.build());
var exampleServiceEndpointGenericGit = new ServiceEndpointGenericGit("exampleServiceEndpointGenericGit", ServiceEndpointGenericGitArgs.builder()
.projectId(example.id())
.repositoryUrl("https://dev.azure.com/org/project/_git/repository")
.username("username")
.password("password")
.serviceEndpointName("Example Generic Git")
.description("Managed by Terraform")
.build());
}
}
resources:
example:
type: azuredevops:Project
properties:
name: Example Project
visibility: private
versionControl: Git
workItemTemplate: Agile
description: Managed by Terraform
exampleServiceEndpointGenericGit:
type: azuredevops:ServiceEndpointGenericGit
name: example
properties:
projectId: ${example.id}
repositoryUrl: https://dev.azure.com/org/project/_git/repository
username: username
password: password
serviceEndpointName: Example Generic Git
description: Managed by Terraform
Relevant Links
Create ServiceEndpointGenericGit Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceEndpointGenericGit(name: string, args: ServiceEndpointGenericGitArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointGenericGit(resource_name: str,
args: ServiceEndpointGenericGitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceEndpointGenericGit(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
repository_url: Optional[str] = None,
service_endpoint_name: Optional[str] = None,
authorization: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
enable_pipelines_access: Optional[bool] = None,
password: Optional[str] = None,
username: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var serviceEndpointGenericGitResource = new AzureDevOps.ServiceEndpointGenericGit("serviceEndpointGenericGitResource", new()
{
ProjectId = "string",
RepositoryUrl = "string",
ServiceEndpointName = "string",
Authorization =
{
{ "string", "string" },
},
Description = "string",
EnablePipelinesAccess = false,
Password = "string",
Username = "string",
});
example, err := azuredevops.NewServiceEndpointGenericGit(ctx, "serviceEndpointGenericGitResource", &azuredevops.ServiceEndpointGenericGitArgs{
ProjectId: pulumi.String("string"),
RepositoryUrl: pulumi.String("string"),
ServiceEndpointName: pulumi.String("string"),
Authorization: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
EnablePipelinesAccess: pulumi.Bool(false),
Password: pulumi.String("string"),
Username: pulumi.String("string"),
})
var serviceEndpointGenericGitResource = new ServiceEndpointGenericGit("serviceEndpointGenericGitResource", ServiceEndpointGenericGitArgs.builder()
.projectId("string")
.repositoryUrl("string")
.serviceEndpointName("string")
.authorization(Map.of("string", "string"))
.description("string")
.enablePipelinesAccess(false)
.password("string")
.username("string")
.build());
service_endpoint_generic_git_resource = azuredevops.ServiceEndpointGenericGit("serviceEndpointGenericGitResource",
project_id="string",
repository_url="string",
service_endpoint_name="string",
authorization={
"string": "string",
},
description="string",
enable_pipelines_access=False,
password="string",
username="string")
const serviceEndpointGenericGitResource = new azuredevops.ServiceEndpointGenericGit("serviceEndpointGenericGitResource", {
projectId: "string",
repositoryUrl: "string",
serviceEndpointName: "string",
authorization: {
string: "string",
},
description: "string",
enablePipelinesAccess: false,
password: "string",
username: "string",
});
type: azuredevops:ServiceEndpointGenericGit
properties:
authorization:
string: string
description: string
enablePipelinesAccess: false
password: string
projectId: string
repositoryUrl: string
serviceEndpointName: string
username: string
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:
- Project
Id string - The ID of the project.
- Repository
Url string - The URL of the repository associated with the service endpoint.
- Service
Endpoint stringName - The name of the service endpoint.
- Dictionary<string, string>
- Description string
- Enable
Pipelines boolAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- Username string
- The username used to authenticate to the git repository.
- Project
Id string - The ID of the project.
- Repository
Url string - The URL of the repository associated with the service endpoint.
- Service
Endpoint stringName - The name of the service endpoint.
- map[string]string
- Description string
- Enable
Pipelines boolAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- Username string
- The username used to authenticate to the git repository.
- project
Id String - The ID of the project.
- repository
Url String - The URL of the repository associated with the service endpoint.
- service
Endpoint StringName - The name of the service endpoint.
- Map<String,String>
- description String
- enable
Pipelines BooleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- username String
- The username used to authenticate to the git repository.
- project
Id string - The ID of the project.
- repository
Url string - The URL of the repository associated with the service endpoint.
- service
Endpoint stringName - The name of the service endpoint.
- {[key: string]: string}
- description string
- enable
Pipelines booleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- 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_ strname - The name of the service endpoint.
- Mapping[str, str]
- description str
- enable_
pipelines_ boolaccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- username str
- The username used to authenticate to the git repository.
- project
Id String - The ID of the project.
- repository
Url String - The URL of the repository associated with the service endpoint.
- service
Endpoint StringName - The name of the service endpoint.
- Map<String>
- description String
- enable
Pipelines BooleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
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,
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.
- Dictionary<string, string>
- Description string
- Enable
Pipelines boolAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- Project
Id string - The ID of the project.
- Repository
Url string - The URL of the repository associated with the service endpoint.
- Service
Endpoint stringName - The name of the service endpoint.
- Username string
- The username used to authenticate to the git repository.
- map[string]string
- Description string
- Enable
Pipelines boolAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- Project
Id string - The ID of the project.
- Repository
Url string - The URL of the repository associated with the service endpoint.
- Service
Endpoint stringName - The name of the service endpoint.
- Username string
- The username used to authenticate to the git repository.
- Map<String,String>
- description String
- enable
Pipelines BooleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- project
Id String - The ID of the project.
- repository
Url String - The URL of the repository associated with the service endpoint.
- service
Endpoint StringName - The name of the service endpoint.
- username String
- The username used to authenticate to the git repository.
- {[key: string]: string}
- description string
- enable
Pipelines booleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- project
Id string - The ID of the project.
- repository
Url string - The URL of the repository associated with the service endpoint.
- service
Endpoint stringName - The name of the service endpoint.
- username string
- The username used to authenticate to the git repository.
- Mapping[str, str]
- description str
- enable_
pipelines_ boolaccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- project_
id str - The ID of the project.
- repository_
url str - The URL of the repository associated with the service endpoint.
- service_
endpoint_ strname - The name of the service endpoint.
- username str
- The username used to authenticate to the git repository.
- Map<String>
- description String
- enable
Pipelines BooleanAccess - 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.
Note For AzureDevOps Git, PAT should be used as the password.
- project
Id String - The ID of the project.
- repository
Url String - The URL of the repository associated with the service endpoint.
- service
Endpoint StringName - 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
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.