Skip to content

Commit

Permalink
Update project_group.go
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jan 16, 2025
1 parent 263c8ef commit 730a456
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/provider/resource/project_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 730a456

Please sign in to comment.