gitlab_project_cluster (Resource)

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

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_project" "foo" {
  name = "foo-project"
}

resource "gitlab_project_cluster" "bar" {
  project                       = gitlab_project.foo.id
  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"
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g.
terraform import gitlab_project_cluster.bar 123:321