Skip to content

Allow gitlab_project_label name updates without replacement

This change updates the gitlab_project_label resource to allow updating the name attribute without forcing resource replacement, which previously caused labels to be removed from issues and MRs.

Changes:

  • Changed resource ID format from : to :<label_id>
  • Removed RequiresReplace() from name attribute schema
  • Updated CRUD operations to use label ID instead of label name
  • Modified Update function to use NewName parameter for renaming
  • Added automatic state migration from V1 to V2 format
  • Added test case to verify label renaming works without replacement
  • Updated documentation to reflect new ID format

The implementation follows the same pattern as gitlab_group_label and ensures that renaming labels preserves their associations with issues and merge requests.

Fixes: #6356 Signed-off-by: VijetaPriya47 vijeta004@gmail.com

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading