Skip to content

gitlab_group import results in applyable changes

Bug Report

When importing a project using terraform import gitlab_group.name name i expected the imported state to match the configuration that is online. Checking with terraform plan i can see that there is a difference between the terraform state and the "reality".

Relevant Terraform Configuration

required_providers {
   gitlab = {
     source = "gitlabhq/gitlab"
     version = "15.7.0"
   }
}

variable "gitlab_token" {
 type      = string
 sensitive = true
}

variable "gitlab_base_url" {
 type = string
}

provider "gitlab" {
 token = var.gitlab_token
 base_url = var.gitlab_base_url
}

resource "gitlab_group" "name" {
 name        = "name"
 path        = "name"
}

Relevant Log Output

terraform plan right after importing the Group.

  ~ resource "gitlab_group" "name" {
        id                                 = "1337"
        name                               = "name"
      ~ project_creation_level             = "developer" -> "maintainer"
      ~ request_access_enabled             = true -> false
      ~ subgroup_creation_level            = "maintainer" -> "owner"
        # (18 unchanged attributes hidden)
    }

Additional Details

  • GitLab Terraform Provider Version: 15.7.0
  • GitLab Version: 15.6
  • Terraform Version: 1.3.6