No changes detected in gitlab_project.approvals_before_merge
Created by: nderraugh
Terraform Version
Terraform v1.0.4 on darwin_amd64
Affected Resource
- gitlab_project
Terraform Configuration Files
terraform {
required_providers {
gitlab = {
source = "gitlabhq/gitlab"
version = "3.7.0"
}
}
}
data "gitlab_group" "somegroup" {
full_path = "somegroup"
}
resource "gitlab_project" "project" {
name = "some name"
namespace_id = gitlab_group.somegroup.id
approvals_before_merge = 2
merge_method = "ff"
description = "description"
remove_source_branch_after_merge = true
only_allow_merge_if_all_discussions_are_resolved = true
only_allow_merge_if_pipeline_succeeds = true
}
Expected Behavior
The provider should detect the difference between the number of approvals configured in TF and Gitlab. Running terraform plan
should show the changes made outside of TF and indicate that applying the current changes will overwrite those changes.
Actual Behavior
The provider does not detect any difference between TF and the configuerd Gitlab project.
Steps to reroduce
Configure the code above for a test repository. Change the Gitlab project config to a single approval required before merge, e.g. project > Settings > General > Merge request (MR) approvals > Any eligible User > 2 -> 1 and re-run terraform plan
.