From 730a4564067edd6fc5f667a1e1ea7478d13e7e62 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Thu, 16 Jan 2025 18:05:27 +0100 Subject: [PATCH] Update project_group.go --- internal/provider/resource/project_group.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/provider/resource/project_group.go b/internal/provider/resource/project_group.go index 36a4831..efa747e 100644 --- a/internal/provider/resource/project_group.go +++ b/internal/provider/resource/project_group.go @@ -363,6 +363,14 @@ func (r *ProjectGroupResource) Update(ctx context.Context, req resource.UpdateRe return } + if plan.GroupName != state.GroupName { + resp.Diagnostics.AddError( + "Unable to update project group", + fmt.Sprintf("Cannot change group name, previous group name: %s, new group name: %s", state.GroupName, plan.GroupName), + ) + return + } + var roles []infisical.UpdateProjectGroupRequestRoles var hasAtleastOnePermanentRole bool for _, el := range plan.Roles {