Skip to content

`name_regex_delete` always detects changes

Created by: mtneug

GitLab Provider version

v3.17.0

GitLab version

GitLab Enterprise Edition 15.1.2-ee

Terraform version

v1.2.8

Relevant Terraform Configuration

resource "gitlab_project" "test" {
  name                = "test"
  path                = "test"

  container_expiration_policy {
    enabled           = true
    cadence           = "1d"
    keep_n            = 5
    name_regex_keep   = ""
    older_than        = "7d"
    name_regex_delete = "[0-9a-zA-Z]{40}"
  }
}

Relevant log output

No response

Description

name_regex_delete is set correctly, but a second run detects it changed. The GitLab API actually returns this under the name name_regex instead of name_regex_delete, leaving the Go field empty after the deserialization, thus detecting a change.

Edited by Timo Furrer