From 3041d7c30c50ddbbb2255214dd2946f2aca28b7f Mon Sep 17 00:00:00 2001 From: sebas_correa Date: Tue, 16 Jun 2026 12:23:25 -0300 Subject: [PATCH 1/2] fix(code_repository): remove access block and ignore_changes from all providers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `access.collaborators` field in the gitlab-configuration attributes is silently discarded by the providers API — not part of the spec mapping, so never stored nor returned on GET. This caused permanent drift on every plan. Removes `lifecycle { ignore_changes = [attributes] }` from all three provider resources (gitlab, github, azure). Verified that none of them generate drift without it — the API persists attributes correctly for all providers. Co-Authored-By: Claude Sonnet 4.6 --- nullplatform/code_repository/main.tf | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/nullplatform/code_repository/main.tf b/nullplatform/code_repository/main.tf index c797657b..6edabb54 100644 --- a/nullplatform/code_repository/main.tf +++ b/nullplatform/code_repository/main.tf @@ -9,13 +9,9 @@ resource "nullplatform_provider_config" "gitlab" { "group_path" : var.gitlab_group_path, "access_token" : var.gitlab_access_token, "installation_url" : var.gitlab_installation_url - }, - "access" : var.gitlab_collaborators_config + } } ) - lifecycle { - ignore_changes = [attributes] - } } /* If the git_provider variable has the value github, create this resource */ @@ -31,9 +27,6 @@ resource "nullplatform_provider_config" "github" { }, } ) - lifecycle { - ignore_changes = [attributes] - } } /* If the git_provider variable has the value azure, create this resource */ @@ -50,7 +43,4 @@ resource "nullplatform_provider_config" "azure" { }, } ) - lifecycle { - ignore_changes = [attributes] - } } From b229f75b03e743eba0ee8be14eb8c9f07a35c87c Mon Sep 17 00:00:00 2001 From: sebas_correa Date: Tue, 16 Jun 2026 12:45:14 -0300 Subject: [PATCH 2/2] fix(code_repository): remove gitlab_collaborators_config variable Variable is no longer used after removing the access block from gitlab attributes. Its required validation would break existing users not passing it. Co-Authored-By: Claude Sonnet 4.6 --- nullplatform/code_repository/variables.tf | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/nullplatform/code_repository/variables.tf b/nullplatform/code_repository/variables.tf index 0b1be05b..4d9a185d 100644 --- a/nullplatform/code_repository/variables.tf +++ b/nullplatform/code_repository/variables.tf @@ -39,22 +39,6 @@ variable "gitlab_installation_url" { } } -variable "gitlab_collaborators_config" { - description = "Configuration for repository collaborators, including their roles and permissions." - type = object({ - collaborators = list(object({ - id = string - role = string - type = string - })) - }) - default = null - validation { - condition = var.git_provider != "gitlab" || var.gitlab_collaborators_config != null - error_message = "collaborators_config is required when git_provider is 'gitlab'." - } -} - variable "gitlab_repository_prefix" { description = "Prefix to use for GitLab repository names." type = string