1. Packages
  2. GitLab
  3. API Docs
  4. ProjectCluster
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.ProjectCluster

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    The gitlab.ProjectCluster resource allows to manage the lifecycle of a project cluster.

    This is deprecated GitLab feature since 14.5

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const foo = new gitlab.Project("foo", {});
    const bar = new gitlab.ProjectCluster("bar", {
        project: foo.id,
        domain: "example.com",
        enabled: true,
        kubernetesApiUrl: "https://124.124.124",
        kubernetesToken: "some-token",
        kubernetesCaCert: "some-cert",
        kubernetesNamespace: "namespace",
        kubernetesAuthorizationType: "rbac",
        environmentScope: "*",
        managementProjectId: "123456",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    foo = gitlab.Project("foo")
    bar = gitlab.ProjectCluster("bar",
        project=foo.id,
        domain="example.com",
        enabled=True,
        kubernetes_api_url="https://124.124.124",
        kubernetes_token="some-token",
        kubernetes_ca_cert="some-cert",
        kubernetes_namespace="namespace",
        kubernetes_authorization_type="rbac",
        environment_scope="*",
        management_project_id="123456")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foo, err := gitlab.NewProject(ctx, "foo", nil)
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewProjectCluster(ctx, "bar", &gitlab.ProjectClusterArgs{
    			Project:                     foo.ID(),
    			Domain:                      pulumi.String("example.com"),
    			Enabled:                     pulumi.Bool(true),
    			KubernetesApiUrl:            pulumi.String("https://124.124.124"),
    			KubernetesToken:             pulumi.String("some-token"),
    			KubernetesCaCert:            pulumi.String("some-cert"),
    			KubernetesNamespace:         pulumi.String("namespace"),
    			KubernetesAuthorizationType: pulumi.String("rbac"),
    			EnvironmentScope:            pulumi.String("*"),
    			ManagementProjectId:         pulumi.String("123456"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new GitLab.Project("foo");
    
        var bar = new GitLab.ProjectCluster("bar", new()
        {
            Project = foo.Id,
            Domain = "example.com",
            Enabled = true,
            KubernetesApiUrl = "https://124.124.124",
            KubernetesToken = "some-token",
            KubernetesCaCert = "some-cert",
            KubernetesNamespace = "namespace",
            KubernetesAuthorizationType = "rbac",
            EnvironmentScope = "*",
            ManagementProjectId = "123456",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.Project;
    import com.pulumi.gitlab.ProjectCluster;
    import com.pulumi.gitlab.ProjectClusterArgs;
    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 foo = new Project("foo");
    
            var bar = new ProjectCluster("bar", ProjectClusterArgs.builder()        
                .project(foo.id())
                .domain("example.com")
                .enabled(true)
                .kubernetesApiUrl("https://124.124.124")
                .kubernetesToken("some-token")
                .kubernetesCaCert("some-cert")
                .kubernetesNamespace("namespace")
                .kubernetesAuthorizationType("rbac")
                .environmentScope("*")
                .managementProjectId("123456")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: gitlab:Project
      bar:
        type: gitlab:ProjectCluster
        properties:
          project: ${foo.id}
          domain: example.com
          enabled: true
          kubernetesApiUrl: https://124.124.124
          kubernetesToken: some-token
          kubernetesCaCert: some-cert
          kubernetesNamespace: namespace
          kubernetesAuthorizationType: rbac
          environmentScope: '*'
          managementProjectId: '123456'
    

    Create ProjectCluster Resource

    new ProjectCluster(name: string, args: ProjectClusterArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectCluster(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       domain: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       environment_scope: Optional[str] = None,
                       kubernetes_api_url: Optional[str] = None,
                       kubernetes_authorization_type: Optional[str] = None,
                       kubernetes_ca_cert: Optional[str] = None,
                       kubernetes_namespace: Optional[str] = None,
                       kubernetes_token: Optional[str] = None,
                       managed: Optional[bool] = None,
                       management_project_id: Optional[str] = None,
                       name: Optional[str] = None,
                       project: Optional[str] = None)
    @overload
    def ProjectCluster(resource_name: str,
                       args: ProjectClusterArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewProjectCluster(ctx *Context, name string, args ProjectClusterArgs, opts ...ResourceOption) (*ProjectCluster, error)
    public ProjectCluster(string name, ProjectClusterArgs args, CustomResourceOptions? opts = null)
    public ProjectCluster(String name, ProjectClusterArgs args)
    public ProjectCluster(String name, ProjectClusterArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectCluster
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectClusterArgs
    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 ProjectClusterArgs
    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 ProjectClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    KubernetesApiUrl string
    The URL to access the Kubernetes API.
    KubernetesToken string
    The token to authenticate against Kubernetes.
    Project string
    The id of the project to add the cluster to.
    Domain string
    The base domain of the cluster.
    Enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    EnvironmentScope string
    The associated environment to the cluster. Defaults to *.
    KubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    KubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    KubernetesNamespace string
    The unique namespace related to the project.
    Managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    ManagementProjectId string
    The ID of the management project for the cluster.
    Name string
    The name of cluster.
    KubernetesApiUrl string
    The URL to access the Kubernetes API.
    KubernetesToken string
    The token to authenticate against Kubernetes.
    Project string
    The id of the project to add the cluster to.
    Domain string
    The base domain of the cluster.
    Enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    EnvironmentScope string
    The associated environment to the cluster. Defaults to *.
    KubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    KubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    KubernetesNamespace string
    The unique namespace related to the project.
    Managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    ManagementProjectId string
    The ID of the management project for the cluster.
    Name string
    The name of cluster.
    kubernetesApiUrl String
    The URL to access the Kubernetes API.
    kubernetesToken String
    The token to authenticate against Kubernetes.
    project String
    The id of the project to add the cluster to.
    domain String
    The base domain of the cluster.
    enabled Boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope String
    The associated environment to the cluster. Defaults to *.
    kubernetesAuthorizationType String
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert String
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace String
    The unique namespace related to the project.
    managed Boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId String
    The ID of the management project for the cluster.
    name String
    The name of cluster.
    kubernetesApiUrl string
    The URL to access the Kubernetes API.
    kubernetesToken string
    The token to authenticate against Kubernetes.
    project string
    The id of the project to add the cluster to.
    domain string
    The base domain of the cluster.
    enabled boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope string
    The associated environment to the cluster. Defaults to *.
    kubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace string
    The unique namespace related to the project.
    managed boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId string
    The ID of the management project for the cluster.
    name string
    The name of cluster.
    kubernetes_api_url str
    The URL to access the Kubernetes API.
    kubernetes_token str
    The token to authenticate against Kubernetes.
    project str
    The id of the project to add the cluster to.
    domain str
    The base domain of the cluster.
    enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environment_scope str
    The associated environment to the cluster. Defaults to *.
    kubernetes_authorization_type str
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetes_ca_cert str
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetes_namespace str
    The unique namespace related to the project.
    managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    management_project_id str
    The ID of the management project for the cluster.
    name str
    The name of cluster.
    kubernetesApiUrl String
    The URL to access the Kubernetes API.
    kubernetesToken String
    The token to authenticate against Kubernetes.
    project String
    The id of the project to add the cluster to.
    domain String
    The base domain of the cluster.
    enabled Boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope String
    The associated environment to the cluster. Defaults to *.
    kubernetesAuthorizationType String
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert String
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace String
    The unique namespace related to the project.
    managed Boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId String
    The ID of the management project for the cluster.
    name String
    The name of cluster.

    Outputs

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

    ClusterType string
    Cluster type.
    CreatedAt string
    Create time.
    Id string
    The provider-assigned unique ID for this managed resource.
    PlatformType string
    Platform type.
    ProviderType string
    Provider type.
    ClusterType string
    Cluster type.
    CreatedAt string
    Create time.
    Id string
    The provider-assigned unique ID for this managed resource.
    PlatformType string
    Platform type.
    ProviderType string
    Provider type.
    clusterType String
    Cluster type.
    createdAt String
    Create time.
    id String
    The provider-assigned unique ID for this managed resource.
    platformType String
    Platform type.
    providerType String
    Provider type.
    clusterType string
    Cluster type.
    createdAt string
    Create time.
    id string
    The provider-assigned unique ID for this managed resource.
    platformType string
    Platform type.
    providerType string
    Provider type.
    cluster_type str
    Cluster type.
    created_at str
    Create time.
    id str
    The provider-assigned unique ID for this managed resource.
    platform_type str
    Platform type.
    provider_type str
    Provider type.
    clusterType String
    Cluster type.
    createdAt String
    Create time.
    id String
    The provider-assigned unique ID for this managed resource.
    platformType String
    Platform type.
    providerType String
    Provider type.

    Look up Existing ProjectCluster Resource

    Get an existing ProjectCluster 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?: ProjectClusterState, opts?: CustomResourceOptions): ProjectCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_type: Optional[str] = None,
            created_at: Optional[str] = None,
            domain: Optional[str] = None,
            enabled: Optional[bool] = None,
            environment_scope: Optional[str] = None,
            kubernetes_api_url: Optional[str] = None,
            kubernetes_authorization_type: Optional[str] = None,
            kubernetes_ca_cert: Optional[str] = None,
            kubernetes_namespace: Optional[str] = None,
            kubernetes_token: Optional[str] = None,
            managed: Optional[bool] = None,
            management_project_id: Optional[str] = None,
            name: Optional[str] = None,
            platform_type: Optional[str] = None,
            project: Optional[str] = None,
            provider_type: Optional[str] = None) -> ProjectCluster
    func GetProjectCluster(ctx *Context, name string, id IDInput, state *ProjectClusterState, opts ...ResourceOption) (*ProjectCluster, error)
    public static ProjectCluster Get(string name, Input<string> id, ProjectClusterState? state, CustomResourceOptions? opts = null)
    public static ProjectCluster get(String name, Output<String> id, ProjectClusterState 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:
    ClusterType string
    Cluster type.
    CreatedAt string
    Create time.
    Domain string
    The base domain of the cluster.
    Enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    EnvironmentScope string
    The associated environment to the cluster. Defaults to *.
    KubernetesApiUrl string
    The URL to access the Kubernetes API.
    KubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    KubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    KubernetesNamespace string
    The unique namespace related to the project.
    KubernetesToken string
    The token to authenticate against Kubernetes.
    Managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    ManagementProjectId string
    The ID of the management project for the cluster.
    Name string
    The name of cluster.
    PlatformType string
    Platform type.
    Project string
    The id of the project to add the cluster to.
    ProviderType string
    Provider type.
    ClusterType string
    Cluster type.
    CreatedAt string
    Create time.
    Domain string
    The base domain of the cluster.
    Enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    EnvironmentScope string
    The associated environment to the cluster. Defaults to *.
    KubernetesApiUrl string
    The URL to access the Kubernetes API.
    KubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    KubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    KubernetesNamespace string
    The unique namespace related to the project.
    KubernetesToken string
    The token to authenticate against Kubernetes.
    Managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    ManagementProjectId string
    The ID of the management project for the cluster.
    Name string
    The name of cluster.
    PlatformType string
    Platform type.
    Project string
    The id of the project to add the cluster to.
    ProviderType string
    Provider type.
    clusterType String
    Cluster type.
    createdAt String
    Create time.
    domain String
    The base domain of the cluster.
    enabled Boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope String
    The associated environment to the cluster. Defaults to *.
    kubernetesApiUrl String
    The URL to access the Kubernetes API.
    kubernetesAuthorizationType String
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert String
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace String
    The unique namespace related to the project.
    kubernetesToken String
    The token to authenticate against Kubernetes.
    managed Boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId String
    The ID of the management project for the cluster.
    name String
    The name of cluster.
    platformType String
    Platform type.
    project String
    The id of the project to add the cluster to.
    providerType String
    Provider type.
    clusterType string
    Cluster type.
    createdAt string
    Create time.
    domain string
    The base domain of the cluster.
    enabled boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope string
    The associated environment to the cluster. Defaults to *.
    kubernetesApiUrl string
    The URL to access the Kubernetes API.
    kubernetesAuthorizationType string
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert string
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace string
    The unique namespace related to the project.
    kubernetesToken string
    The token to authenticate against Kubernetes.
    managed boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId string
    The ID of the management project for the cluster.
    name string
    The name of cluster.
    platformType string
    Platform type.
    project string
    The id of the project to add the cluster to.
    providerType string
    Provider type.
    cluster_type str
    Cluster type.
    created_at str
    Create time.
    domain str
    The base domain of the cluster.
    enabled bool
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environment_scope str
    The associated environment to the cluster. Defaults to *.
    kubernetes_api_url str
    The URL to access the Kubernetes API.
    kubernetes_authorization_type str
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetes_ca_cert str
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetes_namespace str
    The unique namespace related to the project.
    kubernetes_token str
    The token to authenticate against Kubernetes.
    managed bool
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    management_project_id str
    The ID of the management project for the cluster.
    name str
    The name of cluster.
    platform_type str
    Platform type.
    project str
    The id of the project to add the cluster to.
    provider_type str
    Provider type.
    clusterType String
    Cluster type.
    createdAt String
    Create time.
    domain String
    The base domain of the cluster.
    enabled Boolean
    Determines if cluster is active or not. Defaults to true. This attribute cannot be read.
    environmentScope String
    The associated environment to the cluster. Defaults to *.
    kubernetesApiUrl String
    The URL to access the Kubernetes API.
    kubernetesAuthorizationType String
    The cluster authorization type. Valid values are rbac, abac, unknown_authorization. Defaults to rbac.
    kubernetesCaCert String
    TLS certificate (needed if API is using a self-signed TLS certificate).
    kubernetesNamespace String
    The unique namespace related to the project.
    kubernetesToken String
    The token to authenticate against Kubernetes.
    managed Boolean
    Determines if cluster is managed by gitlab or not. Defaults to true. This attribute cannot be read.
    managementProjectId String
    The ID of the management project for the cluster.
    name String
    The name of cluster.
    platformType String
    Platform type.
    project String
    The id of the project to add the cluster to.
    providerType String
    Provider type.

    Import

    GitLab project clusters can be imported using an id made up of projectid:clusterid, e.g.

    $ pulumi import gitlab:index/projectCluster:ProjectCluster bar 123:321
    

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi