gitlab.InstanceCluster
Explore with Pulumi AI
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")
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
})
}
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 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'
Create InstanceCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceCluster(name: string, args: InstanceClusterArgs, opts?: CustomResourceOptions);
@overload
def InstanceCluster(resource_name: str,
args: InstanceClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
kubernetes_api_url: Optional[str] = None,
kubernetes_token: Optional[str] = None,
domain: Optional[str] = None,
enabled: Optional[bool] = None,
environment_scope: Optional[str] = None,
kubernetes_authorization_type: Optional[str] = None,
kubernetes_ca_cert: Optional[str] = None,
kubernetes_namespace: Optional[str] = None,
managed: Optional[bool] = None,
management_project_id: Optional[str] = None,
name: Optional[str] = None)
func NewInstanceCluster(ctx *Context, name string, args InstanceClusterArgs, opts ...ResourceOption) (*InstanceCluster, error)
public InstanceCluster(string name, InstanceClusterArgs args, CustomResourceOptions? opts = null)
public InstanceCluster(String name, InstanceClusterArgs args)
public InstanceCluster(String name, InstanceClusterArgs args, CustomResourceOptions options)
type: gitlab:InstanceCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceClusterArgs
- 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 InstanceClusterArgs
- 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 InstanceClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceClusterArgs
- 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 instanceClusterResource = new GitLab.InstanceCluster("instanceClusterResource", new()
{
KubernetesApiUrl = "string",
KubernetesToken = "string",
Domain = "string",
Enabled = false,
EnvironmentScope = "string",
KubernetesAuthorizationType = "string",
KubernetesCaCert = "string",
KubernetesNamespace = "string",
Managed = false,
ManagementProjectId = "string",
Name = "string",
});
example, err := gitlab.NewInstanceCluster(ctx, "instanceClusterResource", &gitlab.InstanceClusterArgs{
KubernetesApiUrl: pulumi.String("string"),
KubernetesToken: pulumi.String("string"),
Domain: pulumi.String("string"),
Enabled: pulumi.Bool(false),
EnvironmentScope: pulumi.String("string"),
KubernetesAuthorizationType: pulumi.String("string"),
KubernetesCaCert: pulumi.String("string"),
KubernetesNamespace: pulumi.String("string"),
Managed: pulumi.Bool(false),
ManagementProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var instanceClusterResource = new InstanceCluster("instanceClusterResource", InstanceClusterArgs.builder()
.kubernetesApiUrl("string")
.kubernetesToken("string")
.domain("string")
.enabled(false)
.environmentScope("string")
.kubernetesAuthorizationType("string")
.kubernetesCaCert("string")
.kubernetesNamespace("string")
.managed(false)
.managementProjectId("string")
.name("string")
.build());
instance_cluster_resource = gitlab.InstanceCluster("instanceClusterResource",
kubernetes_api_url="string",
kubernetes_token="string",
domain="string",
enabled=False,
environment_scope="string",
kubernetes_authorization_type="string",
kubernetes_ca_cert="string",
kubernetes_namespace="string",
managed=False,
management_project_id="string",
name="string")
const instanceClusterResource = new gitlab.InstanceCluster("instanceClusterResource", {
kubernetesApiUrl: "string",
kubernetesToken: "string",
domain: "string",
enabled: false,
environmentScope: "string",
kubernetesAuthorizationType: "string",
kubernetesCaCert: "string",
kubernetesNamespace: "string",
managed: false,
managementProjectId: "string",
name: "string",
});
type: gitlab:InstanceCluster
properties:
domain: string
enabled: false
environmentScope: string
kubernetesApiUrl: string
kubernetesAuthorizationType: string
kubernetesCaCert: string
kubernetesNamespace: string
kubernetesToken: string
managed: false
managementProjectId: string
name: string
InstanceCluster 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 InstanceCluster resource accepts the following input properties:
- Kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- Kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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. - Environment
Scope string - The associated environment to the cluster. Defaults to
*
. - string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - Kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- Kubernetes
Namespace string - The unique namespace related to the instance.
- Managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - Management
Project stringId - The ID of the management project for the cluster.
- Name string
- The name of cluster.
- Kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- Kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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. - Environment
Scope string - The associated environment to the cluster. Defaults to
*
. - string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - Kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- Kubernetes
Namespace string - The unique namespace related to the instance.
- Managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - Management
Project stringId - The ID of the management project for the cluster.
- Name string
- The name of cluster.
- kubernetes
Api StringUrl - The URL to access the Kubernetes API.
- kubernetes
Token String - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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. - environment
Scope String - The associated environment to the cluster. Defaults to
*
. - String
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca StringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace String - The unique namespace related to the instance.
- managed Boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project StringId - The ID of the management project for the cluster.
- name String
- The name of cluster.
- kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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. - environment
Scope string - The associated environment to the cluster. Defaults to
*
. - string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace string - The unique namespace related to the instance.
- managed boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project stringId - The ID of the management project for the cluster.
- name string
- The name of cluster.
- kubernetes_
api_ strurl - The URL to access the Kubernetes API.
- kubernetes_
token str - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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
*
. - str
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes_
ca_ strcert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes_
namespace str - The unique namespace related to the instance.
- managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management_
project_ strid - The ID of the management project for the cluster.
- name str
- The name of cluster.
- kubernetes
Api StringUrl - The URL to access the Kubernetes API.
- kubernetes
Token String - The token to authenticate against Kubernetes. This attribute cannot be read.
- 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. - environment
Scope String - The associated environment to the cluster. Defaults to
*
. - String
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca StringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace String - The unique namespace related to the instance.
- managed Boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project StringId - 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 InstanceCluster resource produces the following output properties:
- Cluster
Type string - Cluster type.
- Created
At string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Platform
Type string - Platform type.
- Provider
Type string - Provider type.
- Cluster
Type string - Cluster type.
- Created
At string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Platform
Type string - Platform type.
- Provider
Type string - Provider type.
- cluster
Type String - Cluster type.
- created
At String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- platform
Type String - Platform type.
- provider
Type String - Provider type.
- cluster
Type string - Cluster type.
- created
At string - Create time.
- id string
- The provider-assigned unique ID for this managed resource.
- platform
Type string - Platform type.
- provider
Type 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.
- cluster
Type String - Cluster type.
- created
At String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- platform
Type String - Platform type.
- provider
Type String - Provider type.
Look up Existing InstanceCluster Resource
Get an existing InstanceCluster 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?: InstanceClusterState, opts?: CustomResourceOptions): InstanceCluster
@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,
provider_type: Optional[str] = None) -> InstanceCluster
func GetInstanceCluster(ctx *Context, name string, id IDInput, state *InstanceClusterState, opts ...ResourceOption) (*InstanceCluster, error)
public static InstanceCluster Get(string name, Input<string> id, InstanceClusterState? state, CustomResourceOptions? opts = null)
public static InstanceCluster get(String name, Output<String> id, InstanceClusterState 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.
- Cluster
Type string - Cluster type.
- Created
At 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. - Environment
Scope string - The associated environment to the cluster. Defaults to
*
. - Kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - Kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- Kubernetes
Namespace string - The unique namespace related to the instance.
- Kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- Managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - Management
Project stringId - The ID of the management project for the cluster.
- Name string
- The name of cluster.
- Platform
Type string - Platform type.
- Provider
Type string - Provider type.
- Cluster
Type string - Cluster type.
- Created
At 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. - Environment
Scope string - The associated environment to the cluster. Defaults to
*
. - Kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - Kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- Kubernetes
Namespace string - The unique namespace related to the instance.
- Kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- Managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - Management
Project stringId - The ID of the management project for the cluster.
- Name string
- The name of cluster.
- Platform
Type string - Platform type.
- Provider
Type string - Provider type.
- cluster
Type String - Cluster type.
- created
At 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. - environment
Scope String - The associated environment to the cluster. Defaults to
*
. - kubernetes
Api StringUrl - The URL to access the Kubernetes API.
- String
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca StringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace String - The unique namespace related to the instance.
- kubernetes
Token String - The token to authenticate against Kubernetes. This attribute cannot be read.
- managed Boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project StringId - The ID of the management project for the cluster.
- name String
- The name of cluster.
- platform
Type String - Platform type.
- provider
Type String - Provider type.
- cluster
Type string - Cluster type.
- created
At 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. - environment
Scope string - The associated environment to the cluster. Defaults to
*
. - kubernetes
Api stringUrl - The URL to access the Kubernetes API.
- string
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca stringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace string - The unique namespace related to the instance.
- kubernetes
Token string - The token to authenticate against Kubernetes. This attribute cannot be read.
- managed boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project stringId - The ID of the management project for the cluster.
- name string
- The name of cluster.
- platform
Type string - Platform type.
- provider
Type 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_ strurl - The URL to access the Kubernetes API.
- str
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes_
ca_ strcert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes_
namespace str - The unique namespace related to the instance.
- kubernetes_
token str - The token to authenticate against Kubernetes. This attribute cannot be read.
- managed bool
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management_
project_ strid - The ID of the management project for the cluster.
- name str
- The name of cluster.
- platform_
type str - Platform type.
- provider_
type str - Provider type.
- cluster
Type String - Cluster type.
- created
At 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. - environment
Scope String - The associated environment to the cluster. Defaults to
*
. - kubernetes
Api StringUrl - The URL to access the Kubernetes API.
- String
- The cluster authorization type. Valid values are
rbac
,abac
,unknown_authorization
. Defaults torbac
. - kubernetes
Ca StringCert - TLS certificate (needed if API is using a self-signed TLS certificate).
- kubernetes
Namespace String - The unique namespace related to the instance.
- kubernetes
Token String - The token to authenticate against Kubernetes. This attribute cannot be read.
- managed Boolean
- Determines if cluster is managed by gitlab or not. Defaults to
true
. This attribute cannot be read. - management
Project StringId - The ID of the management project for the cluster.
- name String
- The name of cluster.
- platform
Type String - Platform type.
- provider
Type String - Provider type.
Import
GitLab instance clusters can be imported using a clusterid
, e.g.
$ pulumi import gitlab:index/instanceCluster:InstanceCluster bar 123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.