Instance Cluster Args
The gitlab.InstanceCluster
resource allows to manage the lifecycle of an instance 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 bar = new gitlab.InstanceCluster("bar", {
name: "bar-cluster",
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
bar = gitlab.InstanceCluster("bar",
name="bar-cluster",
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")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var bar = new GitLab.InstanceCluster("bar", new()
{
Name = "bar-cluster",
Domain = "example.com",
Enabled = true,
KubernetesApiUrl = "https://124.124.124",
KubernetesToken = "some-token",
KubernetesCaCert = "some-cert",
KubernetesNamespace = "namespace",
KubernetesAuthorizationType = "rbac",
EnvironmentScope = "*",
ManagementProjectId = "123456",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewInstanceCluster(ctx, "bar", &gitlab.InstanceClusterArgs{
Name: pulumi.String("bar-cluster"),
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.InstanceCluster;
import com.pulumi.gitlab.InstanceClusterArgs;
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 bar = new InstanceCluster("bar", InstanceClusterArgs.builder()
.name("bar-cluster")
.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:
bar:
type: gitlab:InstanceCluster
properties:
name: bar-cluster
domain: example.com
enabled: true
kubernetesApiUrl: https://124.124.124
kubernetesToken: some-token
kubernetesCaCert: some-cert
kubernetesNamespace: namespace
kubernetesAuthorizationType: rbac
environmentScope: '*'
managementProjectId: '123456'
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_instance_cluster
. For example: terraform import { to = gitlab_instance_cluster.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: GitLab instance clusters can be imported using a clusterid
, e.g.
$ pulumi import gitlab:index/instanceCluster:InstanceCluster bar 123
Constructors
Properties
The associated environment to the cluster. Defaults to *
.
The URL to access the Kubernetes API.
The cluster authorization type. Valid values are rbac
, abac
, unknown_authorization
. Defaults to rbac
.
TLS certificate (needed if API is using a self-signed TLS certificate).
The unique namespace related to the instance.
The token to authenticate against Kubernetes. This attribute cannot be read.
The ID of the management project for the cluster.