1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. ServiceEndpointKubernetes
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.ServiceEndpointKubernetes

Explore with Pulumi AI

Manages a Kubernetes service endpoint within Azure DevOps.

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 Pulumi",
});
const example_azure = new azuredevops.ServiceEndpointKubernetes("example-azure", {
    projectId: example.id,
    serviceEndpointName: "Example Kubernetes",
    apiserverUrl: "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorizationType: "AzureSubscription",
    azureSubscriptions: [{
        subscriptionId: "00000000-0000-0000-0000-000000000000",
        subscriptionName: "Example",
        tenantId: "00000000-0000-0000-0000-000000000000",
        resourcegroupId: "example-rg",
        namespace: "default",
        clusterName: "example-aks",
    }],
});
const example_kubeconfig = new azuredevops.ServiceEndpointKubernetes("example-kubeconfig", {
    projectId: example.id,
    serviceEndpointName: "Example Kubernetes",
    apiserverUrl: "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorizationType: "Kubeconfig",
    kubeconfig: {
        kubeConfig: `                              apiVersion: v1
                              clusters:
                              - cluster:
                                  certificate-authority: fake-ca-file
                                  server: https://1.2.3.4
                                name: development
                              contexts:
                              - context:
                                  cluster: development
                                  namespace: frontend
                                  user: developer
                                name: dev-frontend
                              current-context: dev-frontend
                              kind: Config
                              preferences: {}
                              users:
                              - name: developer
                                user:
                                  client-certificate: fake-cert-file
                                  client-key: fake-key-file
`,
        acceptUntrustedCerts: true,
        clusterContext: "dev-frontend",
    },
});
const example_service_account = new azuredevops.ServiceEndpointKubernetes("example-service-account", {
    projectId: example.id,
    serviceEndpointName: "Example Kubernetes",
    apiserverUrl: "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorizationType: "ServiceAccount",
    serviceAccount: {
        token: "000000000000000000000000",
        caCert: "0000000000000000000000000000000",
    },
});
Copy
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 Pulumi")
example_azure = azuredevops.ServiceEndpointKubernetes("example-azure",
    project_id=example.id,
    service_endpoint_name="Example Kubernetes",
    apiserver_url="https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorization_type="AzureSubscription",
    azure_subscriptions=[{
        "subscription_id": "00000000-0000-0000-0000-000000000000",
        "subscription_name": "Example",
        "tenant_id": "00000000-0000-0000-0000-000000000000",
        "resourcegroup_id": "example-rg",
        "namespace": "default",
        "cluster_name": "example-aks",
    }])
example_kubeconfig = azuredevops.ServiceEndpointKubernetes("example-kubeconfig",
    project_id=example.id,
    service_endpoint_name="Example Kubernetes",
    apiserver_url="https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorization_type="Kubeconfig",
    kubeconfig={
        "kube_config": """                              apiVersion: v1
                              clusters:
                              - cluster:
                                  certificate-authority: fake-ca-file
                                  server: https://1.2.3.4
                                name: development
                              contexts:
                              - context:
                                  cluster: development
                                  namespace: frontend
                                  user: developer
                                name: dev-frontend
                              current-context: dev-frontend
                              kind: Config
                              preferences: {}
                              users:
                              - name: developer
                                user:
                                  client-certificate: fake-cert-file
                                  client-key: fake-key-file
""",
        "accept_untrusted_certs": True,
        "cluster_context": "dev-frontend",
    })
example_service_account = azuredevops.ServiceEndpointKubernetes("example-service-account",
    project_id=example.id,
    service_endpoint_name="Example Kubernetes",
    apiserver_url="https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
    authorization_type="ServiceAccount",
    service_account={
        "token": "000000000000000000000000",
        "ca_cert": "0000000000000000000000000000000",
    })
Copy
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 Pulumi"),
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewServiceEndpointKubernetes(ctx, "example-azure", &azuredevops.ServiceEndpointKubernetesArgs{
			ProjectId:           example.ID(),
			ServiceEndpointName: pulumi.String("Example Kubernetes"),
			ApiserverUrl:        pulumi.String("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io"),
			AuthorizationType:   pulumi.String("AzureSubscription"),
			AzureSubscriptions: azuredevops.ServiceEndpointKubernetesAzureSubscriptionArray{
				&azuredevops.ServiceEndpointKubernetesAzureSubscriptionArgs{
					SubscriptionId:   pulumi.String("00000000-0000-0000-0000-000000000000"),
					SubscriptionName: pulumi.String("Example"),
					TenantId:         pulumi.String("00000000-0000-0000-0000-000000000000"),
					ResourcegroupId:  pulumi.String("example-rg"),
					Namespace:        pulumi.String("default"),
					ClusterName:      pulumi.String("example-aks"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewServiceEndpointKubernetes(ctx, "example-kubeconfig", &azuredevops.ServiceEndpointKubernetesArgs{
			ProjectId:           example.ID(),
			ServiceEndpointName: pulumi.String("Example Kubernetes"),
			ApiserverUrl:        pulumi.String("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io"),
			AuthorizationType:   pulumi.String("Kubeconfig"),
			Kubeconfig: &azuredevops.ServiceEndpointKubernetesKubeconfigArgs{
				KubeConfig: pulumi.String(`                              apiVersion: v1
                              clusters:
                              - cluster:
                                  certificate-authority: fake-ca-file
                                  server: https://1.2.3.4
                                name: development
                              contexts:
                              - context:
                                  cluster: development
                                  namespace: frontend
                                  user: developer
                                name: dev-frontend
                              current-context: dev-frontend
                              kind: Config
                              preferences: {}
                              users:
                              - name: developer
                                user:
                                  client-certificate: fake-cert-file
                                  client-key: fake-key-file
`),
				AcceptUntrustedCerts: pulumi.Bool(true),
				ClusterContext:       pulumi.String("dev-frontend"),
			},
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewServiceEndpointKubernetes(ctx, "example-service-account", &azuredevops.ServiceEndpointKubernetesArgs{
			ProjectId:           example.ID(),
			ServiceEndpointName: pulumi.String("Example Kubernetes"),
			ApiserverUrl:        pulumi.String("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io"),
			AuthorizationType:   pulumi.String("ServiceAccount"),
			ServiceAccount: &azuredevops.ServiceEndpointKubernetesServiceAccountArgs{
				Token:  pulumi.String("000000000000000000000000"),
				CaCert: pulumi.String("0000000000000000000000000000000"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 Pulumi",
    });

    var example_azure = new AzureDevOps.ServiceEndpointKubernetes("example-azure", new()
    {
        ProjectId = example.Id,
        ServiceEndpointName = "Example Kubernetes",
        ApiserverUrl = "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
        AuthorizationType = "AzureSubscription",
        AzureSubscriptions = new[]
        {
            new AzureDevOps.Inputs.ServiceEndpointKubernetesAzureSubscriptionArgs
            {
                SubscriptionId = "00000000-0000-0000-0000-000000000000",
                SubscriptionName = "Example",
                TenantId = "00000000-0000-0000-0000-000000000000",
                ResourcegroupId = "example-rg",
                Namespace = "default",
                ClusterName = "example-aks",
            },
        },
    });

    var example_kubeconfig = new AzureDevOps.ServiceEndpointKubernetes("example-kubeconfig", new()
    {
        ProjectId = example.Id,
        ServiceEndpointName = "Example Kubernetes",
        ApiserverUrl = "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
        AuthorizationType = "Kubeconfig",
        Kubeconfig = new AzureDevOps.Inputs.ServiceEndpointKubernetesKubeconfigArgs
        {
            KubeConfig = @"                              apiVersion: v1
                              clusters:
                              - cluster:
                                  certificate-authority: fake-ca-file
                                  server: https://1.2.3.4
                                name: development
                              contexts:
                              - context:
                                  cluster: development
                                  namespace: frontend
                                  user: developer
                                name: dev-frontend
                              current-context: dev-frontend
                              kind: Config
                              preferences: {}
                              users:
                              - name: developer
                                user:
                                  client-certificate: fake-cert-file
                                  client-key: fake-key-file
",
            AcceptUntrustedCerts = true,
            ClusterContext = "dev-frontend",
        },
    });

    var example_service_account = new AzureDevOps.ServiceEndpointKubernetes("example-service-account", new()
    {
        ProjectId = example.Id,
        ServiceEndpointName = "Example Kubernetes",
        ApiserverUrl = "https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io",
        AuthorizationType = "ServiceAccount",
        ServiceAccount = new AzureDevOps.Inputs.ServiceEndpointKubernetesServiceAccountArgs
        {
            Token = "000000000000000000000000",
            CaCert = "0000000000000000000000000000000",
        },
    });

});
Copy
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.ServiceEndpointKubernetes;
import com.pulumi.azuredevops.ServiceEndpointKubernetesArgs;
import com.pulumi.azuredevops.inputs.ServiceEndpointKubernetesAzureSubscriptionArgs;
import com.pulumi.azuredevops.inputs.ServiceEndpointKubernetesKubeconfigArgs;
import com.pulumi.azuredevops.inputs.ServiceEndpointKubernetesServiceAccountArgs;
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 Pulumi")
            .build());

        var example_azure = new ServiceEndpointKubernetes("example-azure", ServiceEndpointKubernetesArgs.builder()
            .projectId(example.id())
            .serviceEndpointName("Example Kubernetes")
            .apiserverUrl("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io")
            .authorizationType("AzureSubscription")
            .azureSubscriptions(ServiceEndpointKubernetesAzureSubscriptionArgs.builder()
                .subscriptionId("00000000-0000-0000-0000-000000000000")
                .subscriptionName("Example")
                .tenantId("00000000-0000-0000-0000-000000000000")
                .resourcegroupId("example-rg")
                .namespace("default")
                .clusterName("example-aks")
                .build())
            .build());

        var example_kubeconfig = new ServiceEndpointKubernetes("example-kubeconfig", ServiceEndpointKubernetesArgs.builder()
            .projectId(example.id())
            .serviceEndpointName("Example Kubernetes")
            .apiserverUrl("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io")
            .authorizationType("Kubeconfig")
            .kubeconfig(ServiceEndpointKubernetesKubeconfigArgs.builder()
                .kubeConfig("""
                              apiVersion: v1
                              clusters:
                              - cluster:
                                  certificate-authority: fake-ca-file
                                  server: https://1.2.3.4
                                name: development
                              contexts:
                              - context:
                                  cluster: development
                                  namespace: frontend
                                  user: developer
                                name: dev-frontend
                              current-context: dev-frontend
                              kind: Config
                              preferences: {}
                              users:
                              - name: developer
                                user:
                                  client-certificate: fake-cert-file
                                  client-key: fake-key-file
                """)
                .acceptUntrustedCerts(true)
                .clusterContext("dev-frontend")
                .build())
            .build());

        var example_service_account = new ServiceEndpointKubernetes("example-service-account", ServiceEndpointKubernetesArgs.builder()
            .projectId(example.id())
            .serviceEndpointName("Example Kubernetes")
            .apiserverUrl("https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io")
            .authorizationType("ServiceAccount")
            .serviceAccount(ServiceEndpointKubernetesServiceAccountArgs.builder()
                .token("000000000000000000000000")
                .caCert("0000000000000000000000000000000")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
      description: Managed by Pulumi
  example-azure:
    type: azuredevops:ServiceEndpointKubernetes
    properties:
      projectId: ${example.id}
      serviceEndpointName: Example Kubernetes
      apiserverUrl: https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io
      authorizationType: AzureSubscription
      azureSubscriptions:
        - subscriptionId: 00000000-0000-0000-0000-000000000000
          subscriptionName: Example
          tenantId: 00000000-0000-0000-0000-000000000000
          resourcegroupId: example-rg
          namespace: default
          clusterName: example-aks
  example-kubeconfig:
    type: azuredevops:ServiceEndpointKubernetes
    properties:
      projectId: ${example.id}
      serviceEndpointName: Example Kubernetes
      apiserverUrl: https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io
      authorizationType: Kubeconfig
      kubeconfig:
        kubeConfig: |2
                                        apiVersion: v1
                                        clusters:
                                        - cluster:
                                            certificate-authority: fake-ca-file
                                            server: https://1.2.3.4
                                          name: development
                                        contexts:
                                        - context:
                                            cluster: development
                                            namespace: frontend
                                            user: developer
                                          name: dev-frontend
                                        current-context: dev-frontend
                                        kind: Config
                                        preferences: {}
                                        users:
                                        - name: developer
                                          user:
                                            client-certificate: fake-cert-file
                                            client-key: fake-key-file
        acceptUntrustedCerts: true
        clusterContext: dev-frontend
  example-service-account:
    type: azuredevops:ServiceEndpointKubernetes
    properties:
      projectId: ${example.id}
      serviceEndpointName: Example Kubernetes
      apiserverUrl: https://sample-kubernetes-cluster.hcp.westeurope.azmk8s.io
      authorizationType: ServiceAccount
      serviceAccount:
        token: '000000000000000000000000'
        caCert: '0000000000000000000000000000000'
Copy

Create ServiceEndpointKubernetes Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServiceEndpointKubernetes(name: string, args: ServiceEndpointKubernetesArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointKubernetes(resource_name: str,
                              args: ServiceEndpointKubernetesArgs,
                              opts: Optional[ResourceOptions] = None)

@overload
def ServiceEndpointKubernetes(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              apiserver_url: Optional[str] = None,
                              authorization_type: Optional[str] = None,
                              project_id: Optional[str] = None,
                              service_endpoint_name: Optional[str] = None,
                              azure_subscriptions: Optional[Sequence[ServiceEndpointKubernetesAzureSubscriptionArgs]] = None,
                              description: Optional[str] = None,
                              kubeconfig: Optional[ServiceEndpointKubernetesKubeconfigArgs] = None,
                              service_account: Optional[ServiceEndpointKubernetesServiceAccountArgs] = None)
func NewServiceEndpointKubernetes(ctx *Context, name string, args ServiceEndpointKubernetesArgs, opts ...ResourceOption) (*ServiceEndpointKubernetes, error)
public ServiceEndpointKubernetes(string name, ServiceEndpointKubernetesArgs args, CustomResourceOptions? opts = null)
public ServiceEndpointKubernetes(String name, ServiceEndpointKubernetesArgs args)
public ServiceEndpointKubernetes(String name, ServiceEndpointKubernetesArgs args, CustomResourceOptions options)
type: azuredevops:ServiceEndpointKubernetes
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointKubernetesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceEndpointKubernetesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointKubernetesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointKubernetesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceEndpointKubernetesArgs
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 serviceEndpointKubernetesResource = new AzureDevOps.ServiceEndpointKubernetes("serviceEndpointKubernetesResource", new()
{
    ApiserverUrl = "string",
    AuthorizationType = "string",
    ProjectId = "string",
    ServiceEndpointName = "string",
    AzureSubscriptions = new[]
    {
        new AzureDevOps.Inputs.ServiceEndpointKubernetesAzureSubscriptionArgs
        {
            ClusterName = "string",
            ResourcegroupId = "string",
            SubscriptionId = "string",
            SubscriptionName = "string",
            TenantId = "string",
            AzureEnvironment = "string",
            ClusterAdmin = false,
            Namespace = "string",
        },
    },
    Description = "string",
    Kubeconfig = new AzureDevOps.Inputs.ServiceEndpointKubernetesKubeconfigArgs
    {
        KubeConfig = "string",
        AcceptUntrustedCerts = false,
        ClusterContext = "string",
    },
    ServiceAccount = new AzureDevOps.Inputs.ServiceEndpointKubernetesServiceAccountArgs
    {
        CaCert = "string",
        Token = "string",
        AcceptUntrustedCerts = false,
    },
});
Copy
example, err := azuredevops.NewServiceEndpointKubernetes(ctx, "serviceEndpointKubernetesResource", &azuredevops.ServiceEndpointKubernetesArgs{
	ApiserverUrl:        pulumi.String("string"),
	AuthorizationType:   pulumi.String("string"),
	ProjectId:           pulumi.String("string"),
	ServiceEndpointName: pulumi.String("string"),
	AzureSubscriptions: azuredevops.ServiceEndpointKubernetesAzureSubscriptionArray{
		&azuredevops.ServiceEndpointKubernetesAzureSubscriptionArgs{
			ClusterName:      pulumi.String("string"),
			ResourcegroupId:  pulumi.String("string"),
			SubscriptionId:   pulumi.String("string"),
			SubscriptionName: pulumi.String("string"),
			TenantId:         pulumi.String("string"),
			AzureEnvironment: pulumi.String("string"),
			ClusterAdmin:     pulumi.Bool(false),
			Namespace:        pulumi.String("string"),
		},
	},
	Description: pulumi.String("string"),
	Kubeconfig: &azuredevops.ServiceEndpointKubernetesKubeconfigArgs{
		KubeConfig:           pulumi.String("string"),
		AcceptUntrustedCerts: pulumi.Bool(false),
		ClusterContext:       pulumi.String("string"),
	},
	ServiceAccount: &azuredevops.ServiceEndpointKubernetesServiceAccountArgs{
		CaCert:               pulumi.String("string"),
		Token:                pulumi.String("string"),
		AcceptUntrustedCerts: pulumi.Bool(false),
	},
})
Copy
var serviceEndpointKubernetesResource = new ServiceEndpointKubernetes("serviceEndpointKubernetesResource", ServiceEndpointKubernetesArgs.builder()
    .apiserverUrl("string")
    .authorizationType("string")
    .projectId("string")
    .serviceEndpointName("string")
    .azureSubscriptions(ServiceEndpointKubernetesAzureSubscriptionArgs.builder()
        .clusterName("string")
        .resourcegroupId("string")
        .subscriptionId("string")
        .subscriptionName("string")
        .tenantId("string")
        .azureEnvironment("string")
        .clusterAdmin(false)
        .namespace("string")
        .build())
    .description("string")
    .kubeconfig(ServiceEndpointKubernetesKubeconfigArgs.builder()
        .kubeConfig("string")
        .acceptUntrustedCerts(false)
        .clusterContext("string")
        .build())
    .serviceAccount(ServiceEndpointKubernetesServiceAccountArgs.builder()
        .caCert("string")
        .token("string")
        .acceptUntrustedCerts(false)
        .build())
    .build());
Copy
service_endpoint_kubernetes_resource = azuredevops.ServiceEndpointKubernetes("serviceEndpointKubernetesResource",
    apiserver_url="string",
    authorization_type="string",
    project_id="string",
    service_endpoint_name="string",
    azure_subscriptions=[{
        "cluster_name": "string",
        "resourcegroup_id": "string",
        "subscription_id": "string",
        "subscription_name": "string",
        "tenant_id": "string",
        "azure_environment": "string",
        "cluster_admin": False,
        "namespace": "string",
    }],
    description="string",
    kubeconfig={
        "kube_config": "string",
        "accept_untrusted_certs": False,
        "cluster_context": "string",
    },
    service_account={
        "ca_cert": "string",
        "token": "string",
        "accept_untrusted_certs": False,
    })
Copy
const serviceEndpointKubernetesResource = new azuredevops.ServiceEndpointKubernetes("serviceEndpointKubernetesResource", {
    apiserverUrl: "string",
    authorizationType: "string",
    projectId: "string",
    serviceEndpointName: "string",
    azureSubscriptions: [{
        clusterName: "string",
        resourcegroupId: "string",
        subscriptionId: "string",
        subscriptionName: "string",
        tenantId: "string",
        azureEnvironment: "string",
        clusterAdmin: false,
        namespace: "string",
    }],
    description: "string",
    kubeconfig: {
        kubeConfig: "string",
        acceptUntrustedCerts: false,
        clusterContext: "string",
    },
    serviceAccount: {
        caCert: "string",
        token: "string",
        acceptUntrustedCerts: false,
    },
});
Copy
type: azuredevops:ServiceEndpointKubernetes
properties:
    apiserverUrl: string
    authorizationType: string
    azureSubscriptions:
        - azureEnvironment: string
          clusterAdmin: false
          clusterName: string
          namespace: string
          resourcegroupId: string
          subscriptionId: string
          subscriptionName: string
          tenantId: string
    description: string
    kubeconfig:
        acceptUntrustedCerts: false
        clusterContext: string
        kubeConfig: string
    projectId: string
    serviceAccount:
        acceptUntrustedCerts: false
        caCert: string
        token: string
    serviceEndpointName: string
Copy

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

ApiserverUrl This property is required. string
The hostname (in form of URI) of the Kubernetes API.
AuthorizationType This property is required. string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project.
ServiceEndpointName This property is required. string
The Service Endpoint name.
AzureSubscriptions List<Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesAzureSubscription>
An azure_subscription block as defined below.
Description string
Kubeconfig Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
ServiceAccount Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
ApiserverUrl This property is required. string
The hostname (in form of URI) of the Kubernetes API.
AuthorizationType This property is required. string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project.
ServiceEndpointName This property is required. string
The Service Endpoint name.
AzureSubscriptions []ServiceEndpointKubernetesAzureSubscriptionArgs
An azure_subscription block as defined below.
Description string
Kubeconfig ServiceEndpointKubernetesKubeconfigArgs
A kubeconfig block as defined below.
ServiceAccount ServiceEndpointKubernetesServiceAccountArgs
A service_account block as defined below.
apiserverUrl This property is required. String
The hostname (in form of URI) of the Kubernetes API.
authorizationType This property is required. String
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the project.
serviceEndpointName This property is required. String
The Service Endpoint name.
azureSubscriptions List<ServiceEndpointKubernetesAzureSubscription>
An azure_subscription block as defined below.
description String
kubeconfig ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
serviceAccount ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
apiserverUrl This property is required. string
The hostname (in form of URI) of the Kubernetes API.
authorizationType This property is required. string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
projectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project.
serviceEndpointName This property is required. string
The Service Endpoint name.
azureSubscriptions ServiceEndpointKubernetesAzureSubscription[]
An azure_subscription block as defined below.
description string
kubeconfig ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
serviceAccount ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
apiserver_url This property is required. str
The hostname (in form of URI) of the Kubernetes API.
authorization_type This property is required. str
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
project_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the project.
service_endpoint_name This property is required. str
The Service Endpoint name.
azure_subscriptions Sequence[ServiceEndpointKubernetesAzureSubscriptionArgs]
An azure_subscription block as defined below.
description str
kubeconfig ServiceEndpointKubernetesKubeconfigArgs
A kubeconfig block as defined below.
service_account ServiceEndpointKubernetesServiceAccountArgs
A service_account block as defined below.
apiserverUrl This property is required. String
The hostname (in form of URI) of the Kubernetes API.
authorizationType This property is required. String
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the project.
serviceEndpointName This property is required. String
The Service Endpoint name.
azureSubscriptions List<Property Map>
An azure_subscription block as defined below.
description String
kubeconfig Property Map
A kubeconfig block as defined below.
serviceAccount Property Map
A service_account block as defined below.

Outputs

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

Authorization Dictionary<string, string>
Id string
The provider-assigned unique ID for this managed resource.
Authorization map[string]string
Id string
The provider-assigned unique ID for this managed resource.
authorization Map<String,String>
id String
The provider-assigned unique ID for this managed resource.
authorization {[key: string]: string}
id string
The provider-assigned unique ID for this managed resource.
authorization Mapping[str, str]
id str
The provider-assigned unique ID for this managed resource.
authorization Map<String>
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ServiceEndpointKubernetes Resource

Get an existing ServiceEndpointKubernetes 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?: ServiceEndpointKubernetesState, opts?: CustomResourceOptions): ServiceEndpointKubernetes
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        apiserver_url: Optional[str] = None,
        authorization: Optional[Mapping[str, str]] = None,
        authorization_type: Optional[str] = None,
        azure_subscriptions: Optional[Sequence[ServiceEndpointKubernetesAzureSubscriptionArgs]] = None,
        description: Optional[str] = None,
        kubeconfig: Optional[ServiceEndpointKubernetesKubeconfigArgs] = None,
        project_id: Optional[str] = None,
        service_account: Optional[ServiceEndpointKubernetesServiceAccountArgs] = None,
        service_endpoint_name: Optional[str] = None) -> ServiceEndpointKubernetes
func GetServiceEndpointKubernetes(ctx *Context, name string, id IDInput, state *ServiceEndpointKubernetesState, opts ...ResourceOption) (*ServiceEndpointKubernetes, error)
public static ServiceEndpointKubernetes Get(string name, Input<string> id, ServiceEndpointKubernetesState? state, CustomResourceOptions? opts = null)
public static ServiceEndpointKubernetes get(String name, Output<String> id, ServiceEndpointKubernetesState state, CustomResourceOptions options)
resources:  _:    type: azuredevops:ServiceEndpointKubernetes    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApiserverUrl string
The hostname (in form of URI) of the Kubernetes API.
Authorization Dictionary<string, string>
AuthorizationType string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
AzureSubscriptions List<Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesAzureSubscription>
An azure_subscription block as defined below.
Description string
Kubeconfig Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
ProjectId Changes to this property will trigger replacement. string
The ID of the project.
ServiceAccount Pulumi.AzureDevOps.Inputs.ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
ServiceEndpointName string
The Service Endpoint name.
ApiserverUrl string
The hostname (in form of URI) of the Kubernetes API.
Authorization map[string]string
AuthorizationType string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
AzureSubscriptions []ServiceEndpointKubernetesAzureSubscriptionArgs
An azure_subscription block as defined below.
Description string
Kubeconfig ServiceEndpointKubernetesKubeconfigArgs
A kubeconfig block as defined below.
ProjectId Changes to this property will trigger replacement. string
The ID of the project.
ServiceAccount ServiceEndpointKubernetesServiceAccountArgs
A service_account block as defined below.
ServiceEndpointName string
The Service Endpoint name.
apiserverUrl String
The hostname (in form of URI) of the Kubernetes API.
authorization Map<String,String>
authorizationType String
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
azureSubscriptions List<ServiceEndpointKubernetesAzureSubscription>
An azure_subscription block as defined below.
description String
kubeconfig ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
projectId Changes to this property will trigger replacement. String
The ID of the project.
serviceAccount ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
serviceEndpointName String
The Service Endpoint name.
apiserverUrl string
The hostname (in form of URI) of the Kubernetes API.
authorization {[key: string]: string}
authorizationType string
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
azureSubscriptions ServiceEndpointKubernetesAzureSubscription[]
An azure_subscription block as defined below.
description string
kubeconfig ServiceEndpointKubernetesKubeconfig
A kubeconfig block as defined below.
projectId Changes to this property will trigger replacement. string
The ID of the project.
serviceAccount ServiceEndpointKubernetesServiceAccount
A service_account block as defined below.
serviceEndpointName string
The Service Endpoint name.
apiserver_url str
The hostname (in form of URI) of the Kubernetes API.
authorization Mapping[str, str]
authorization_type str
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
azure_subscriptions Sequence[ServiceEndpointKubernetesAzureSubscriptionArgs]
An azure_subscription block as defined below.
description str
kubeconfig ServiceEndpointKubernetesKubeconfigArgs
A kubeconfig block as defined below.
project_id Changes to this property will trigger replacement. str
The ID of the project.
service_account ServiceEndpointKubernetesServiceAccountArgs
A service_account block as defined below.
service_endpoint_name str
The Service Endpoint name.
apiserverUrl String
The hostname (in form of URI) of the Kubernetes API.
authorization Map<String>
authorizationType String
The authentication method used to authenticate on the Kubernetes cluster. The value should be one of AzureSubscription, Kubeconfig, ServiceAccount.
azureSubscriptions List<Property Map>
An azure_subscription block as defined below.
description String
kubeconfig Property Map
A kubeconfig block as defined below.
projectId Changes to this property will trigger replacement. String
The ID of the project.
serviceAccount Property Map
A service_account block as defined below.
serviceEndpointName String
The Service Endpoint name.

Supporting Types

ServiceEndpointKubernetesAzureSubscription
, ServiceEndpointKubernetesAzureSubscriptionArgs

ClusterName This property is required. string
The name of the Kubernetes cluster.
ResourcegroupId This property is required. string
The resource group name, to which the Kubernetes cluster is deployed.
SubscriptionId This property is required. string
The id of the Azure subscription.
SubscriptionName This property is required. string
The name of the Azure subscription.
TenantId This property is required. string
The id of the tenant used by the subscription.
AzureEnvironment string
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
ClusterAdmin Changes to this property will trigger replacement. bool
Set this option to allow use cluster admin credentials.
Namespace string
The Kubernetes namespace. Default value is "default".
ClusterName This property is required. string
The name of the Kubernetes cluster.
ResourcegroupId This property is required. string
The resource group name, to which the Kubernetes cluster is deployed.
SubscriptionId This property is required. string
The id of the Azure subscription.
SubscriptionName This property is required. string
The name of the Azure subscription.
TenantId This property is required. string
The id of the tenant used by the subscription.
AzureEnvironment string
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
ClusterAdmin Changes to this property will trigger replacement. bool
Set this option to allow use cluster admin credentials.
Namespace string
The Kubernetes namespace. Default value is "default".
clusterName This property is required. String
The name of the Kubernetes cluster.
resourcegroupId This property is required. String
The resource group name, to which the Kubernetes cluster is deployed.
subscriptionId This property is required. String
The id of the Azure subscription.
subscriptionName This property is required. String
The name of the Azure subscription.
tenantId This property is required. String
The id of the tenant used by the subscription.
azureEnvironment String
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
clusterAdmin Changes to this property will trigger replacement. Boolean
Set this option to allow use cluster admin credentials.
namespace String
The Kubernetes namespace. Default value is "default".
clusterName This property is required. string
The name of the Kubernetes cluster.
resourcegroupId This property is required. string
The resource group name, to which the Kubernetes cluster is deployed.
subscriptionId This property is required. string
The id of the Azure subscription.
subscriptionName This property is required. string
The name of the Azure subscription.
tenantId This property is required. string
The id of the tenant used by the subscription.
azureEnvironment string
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
clusterAdmin Changes to this property will trigger replacement. boolean
Set this option to allow use cluster admin credentials.
namespace string
The Kubernetes namespace. Default value is "default".
cluster_name This property is required. str
The name of the Kubernetes cluster.
resourcegroup_id This property is required. str
The resource group name, to which the Kubernetes cluster is deployed.
subscription_id This property is required. str
The id of the Azure subscription.
subscription_name This property is required. str
The name of the Azure subscription.
tenant_id This property is required. str
The id of the tenant used by the subscription.
azure_environment str
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
cluster_admin Changes to this property will trigger replacement. bool
Set this option to allow use cluster admin credentials.
namespace str
The Kubernetes namespace. Default value is "default".
clusterName This property is required. String
The name of the Kubernetes cluster.
resourcegroupId This property is required. String
The resource group name, to which the Kubernetes cluster is deployed.
subscriptionId This property is required. String
The id of the Azure subscription.
subscriptionName This property is required. String
The name of the Azure subscription.
tenantId This property is required. String
The id of the tenant used by the subscription.
azureEnvironment String
Azure environment refers to whether the public cloud offering or domestic (government) clouds are being used. Currently, only the public cloud is supported. The value must be AzureCloud. This is also the default-value.
clusterAdmin Changes to this property will trigger replacement. Boolean
Set this option to allow use cluster admin credentials.
namespace String
The Kubernetes namespace. Default value is "default".

ServiceEndpointKubernetesKubeconfig
, ServiceEndpointKubernetesKubeconfigArgs

KubeConfig This property is required. string
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
AcceptUntrustedCerts bool
Set this option to allow clients to accept a self-signed certificate.
ClusterContext string
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.
KubeConfig This property is required. string
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
AcceptUntrustedCerts bool
Set this option to allow clients to accept a self-signed certificate.
ClusterContext string
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.
kubeConfig This property is required. String
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
acceptUntrustedCerts Boolean
Set this option to allow clients to accept a self-signed certificate.
clusterContext String
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.
kubeConfig This property is required. string
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
acceptUntrustedCerts boolean
Set this option to allow clients to accept a self-signed certificate.
clusterContext string
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.
kube_config This property is required. str
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
accept_untrusted_certs bool
Set this option to allow clients to accept a self-signed certificate.
cluster_context str
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.
kubeConfig This property is required. String
The content of the kubeconfig in yaml notation to be used to communicate with the API-Server of Kubernetes.
acceptUntrustedCerts Boolean
Set this option to allow clients to accept a self-signed certificate.
clusterContext String
Context within the kubeconfig file that is to be used for identifying the cluster. Default value is the current-context set in kubeconfig.

ServiceEndpointKubernetesServiceAccount
, ServiceEndpointKubernetesServiceAccountArgs

CaCert This property is required. string
The certificate from a Kubernetes secret object.
Token This property is required. string
The token from a Kubernetes secret object.
AcceptUntrustedCerts bool
Set this option to allow clients to accept a self-signed certificate. Defaults to false.
CaCert This property is required. string
The certificate from a Kubernetes secret object.
Token This property is required. string
The token from a Kubernetes secret object.
AcceptUntrustedCerts bool
Set this option to allow clients to accept a self-signed certificate. Defaults to false.
caCert This property is required. String
The certificate from a Kubernetes secret object.
token This property is required. String
The token from a Kubernetes secret object.
acceptUntrustedCerts Boolean
Set this option to allow clients to accept a self-signed certificate. Defaults to false.
caCert This property is required. string
The certificate from a Kubernetes secret object.
token This property is required. string
The token from a Kubernetes secret object.
acceptUntrustedCerts boolean
Set this option to allow clients to accept a self-signed certificate. Defaults to false.
ca_cert This property is required. str
The certificate from a Kubernetes secret object.
token This property is required. str
The token from a Kubernetes secret object.
accept_untrusted_certs bool
Set this option to allow clients to accept a self-signed certificate. Defaults to false.
caCert This property is required. String
The certificate from a Kubernetes secret object.
token This property is required. String
The token from a Kubernetes secret object.
acceptUntrustedCerts Boolean
Set this option to allow clients to accept a self-signed certificate. Defaults to false.

Import

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

$ pulumi import azuredevops:index/serviceEndpointKubernetes:ServiceEndpointKubernetes example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
Copy

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.