GroupCluster

# gitlab_group_cluster

This resource allows you to create and manage group clusters for your GitLab groups. For further information on clusters, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new GitLab.Group("foo", new GitLab.GroupArgs
        {
            Path = "foo-path",
        });
        var bar = new GitLab.GroupCluster("bar", new GitLab.GroupClusterArgs
        {
            Domain = "example.com",
            Enabled = true,
            EnvironmentScope = "*",
            Group = foo.Id,
            KubernetesApiUrl = "https://124.124.124",
            KubernetesAuthorizationType = "rbac",
            KubernetesCaCert = "some-cert",
            KubernetesToken = "some-token",
            ManagementProjectId = "123456",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := gitlab.NewGroup(ctx, "foo", &gitlab.GroupArgs{
			Path: pulumi.String("foo-path"),
		})
		if err != nil {
			return err
		}
		_, err = gitlab.NewGroupCluster(ctx, "bar", &gitlab.GroupClusterArgs{
			Domain:                      pulumi.String("example.com"),
			Enabled:                     pulumi.Bool(true),
			EnvironmentScope:            pulumi.String("*"),
			Group:                       foo.ID(),
			KubernetesApiUrl:            pulumi.String("https://124.124.124"),
			KubernetesAuthorizationType: pulumi.String("rbac"),
			KubernetesCaCert:            pulumi.String("some-cert"),
			KubernetesToken:             pulumi.String("some-token"),
			ManagementProjectId:         pulumi.String("123456"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

foo = gitlab.Group("foo", path="foo-path")
bar = gitlab.GroupCluster("bar",
    domain="example.com",
    enabled=True,
    environment_scope="*",
    group=foo.id,
    kubernetes_api_url="https://124.124.124",
    kubernetes_authorization_type="rbac",
    kubernetes_ca_cert="some-cert",
    kubernetes_token="some-token",
    management_project_id="123456")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const foo = new gitlab.Group("foo", {
    path: "foo-path",
});
const bar = new gitlab.GroupCluster("bar", {
    domain: "example.com",
    enabled: true,
    environmentScope: "*",
    group: foo.id,
    kubernetesApiUrl: "https://124.124.124",
    kubernetesAuthorizationType: "rbac",
    kubernetesCaCert: "some-cert",
    kubernetesToken: "some-token",
    managementProjectId: "123456",
});

Create a GroupCluster Resource

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

GroupCluster Resource Properties

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

Inputs

The GroupCluster resource accepts the following input properties:

Group string
The id of the group to add the cluster to.
KubernetesApiUrl string
The URL to access the Kubernetes API.
KubernetesToken string
The token to authenticate against Kubernetes.
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).
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.
Group string
The id of the group to add the cluster to.
KubernetesApiUrl string
The URL to access the Kubernetes API.
KubernetesToken string
The token to authenticate against Kubernetes.
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).
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.
group string
The id of the group to add the cluster to.
kubernetesApiUrl string
The URL to access the Kubernetes API.
kubernetesToken string
The token to authenticate against Kubernetes.
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).
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.
group str
The id of the group to add the cluster to.
kubernetes_api_url str
The URL to access the Kubernetes API.
kubernetes_token str
The token to authenticate against Kubernetes.
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).
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.

Outputs

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

ClusterType string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
PlatformType string
ProviderType string
ClusterType string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
PlatformType string
ProviderType string
clusterType string
createdAt string
id string
The provider-assigned unique ID for this managed resource.
platformType string
providerType string
cluster_type str
created_at str
id str
The provider-assigned unique ID for this managed resource.
platform_type str
provider_type str

Look up an Existing GroupCluster Resource

Get an existing GroupCluster 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?: GroupClusterState, opts?: CustomResourceOptions): GroupCluster
@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,
        group: Optional[str] = None,
        kubernetes_api_url: Optional[str] = None,
        kubernetes_authorization_type: Optional[str] = None,
        kubernetes_ca_cert: 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,
        provider_type: Optional[str] = None) -> GroupCluster
func GetGroupCluster(ctx *Context, name string, id IDInput, state *GroupClusterState, opts ...ResourceOption) (*GroupCluster, error)
public static GroupCluster Get(string name, Input<string> id, GroupClusterState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterType string
CreatedAt string
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 *.
Group string
The id of the group to add the cluster 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).
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
ProviderType string
ClusterType string
CreatedAt string
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 *.
Group string
The id of the group to add the cluster 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).
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
ProviderType string
clusterType string
createdAt string
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 *.
group string
The id of the group to add the cluster 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).
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
providerType string
cluster_type str
created_at str
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 *.
group str
The id of the group to add the cluster 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_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
provider_type str

Import

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

 $ pulumi import gitlab:index/groupCluster:GroupCluster bar 123:321

Package Details

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