Group creation results in "Root resource was present, but now absent"

Created by: dcoy

Terraform Version

terraform version == 1.0.3 (also 1.0.0)

Affected Resource(s)

Please list the resources as a list, for example:

  • gitlab_group

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

terraform {
    required_providers {
        gitlab = {
            source = "gitlabhq/gitlab"
            version = "3.7.0"
        }
    }
}

provider "gitlab" {
    base_url = "https://gitlab.domain/"
    token = "tokenGoesHere"
    insecure = true
}


variable "gitlab_token" {
    default = []
}

resource "gitlab_group" "tfgroup" {
    name = "tfgroup"
    path = "tfgroup"
    description = "An example group"
}

Debug Output

TF Debug Log

Panic Output

N/A

Expected Behavior

GitLab Terraform provider creates the group, then successfully reads the group to confirm the state change.

Actual Behavior

The GitLab Terraform provider will create the group, but then will immediately attempt to read the state of the created group. The group itself is created through GitLab, however, GitLab cannot create the group quickly enough for the provider to read the state of the group from the API. Eventually, this will succeed, but on first pass the group creation will fail.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply to create the group

Important Factoids

GitLab EE v14.0.0

References

N/A

Edited by Timo Furrer