Skip to content

Add support for instance level clusters management via the GitLab Terraform provider

Github

Since the Terraform provider repo is hosted on Github, work on this issue will happen here: PR to add instance cluster support to Terraform provider and here: PR to add support for the instance cluster API to the upstream package

Problem to solve

GitLab Administrators can use Terraform to attach Kubernetes clusters at the GitLab instance level. Previously, Platform Engineers could use Terraform to attach Kubernetes clusters at the group and project levels. We have added support to provide instance level clusters via Terraform too.

Intended users

User experience goal

Be able to manage instance level clusers via Terraform.

Proposal

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_authorization_type = "rbac"
  environment_scope             = "*"
  management_cluster_id         = "123456"
}

Further details

As a Platform Engineer, in order to have a unified workflow around cluster and GitLab management, I would like to use Terraform to manage GitLab instance level clusters.

Following #31000 (closed) we can add Terraform support for instance level clusters.

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Viktor Nagy (GitLab)