The gitlab_instance_cluster
resource allows to manage the lifecycle of an instance cluster.
Upstream API: GitLab REST API docs
resource "gitlab_instance_cluster" "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"
}
kubernetes_api_url
(String) The URL to access the Kubernetes API.kubernetes_token
(String, Sensitive) The token to authenticate against Kubernetes. This attribute cannot be read.name
(String) The name of cluster.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_authorization_type
(String) The cluster authorization type. Valid values are rbac
, abac
, unknown_authorization
. Defaults to rbac
.kubernetes_ca_cert
(String) 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_id
(String) The ID of the management project for the cluster.cluster_type
(String) Cluster type.created_at
(String) Create time.id
(String) The ID of this resource.platform_type
(String) Platform type.provider_type
(String) Provider type.Import is supported using the following syntax:
# GitLab instance clusters can be imported using a `clusterid`, e.g.
terraform import gitlab_instance_cluster.bar 123