Skip to content

Commit

Permalink
Allow parallelization of per instance config deletions by not locking…
Browse files Browse the repository at this point in the history
… on the IGM (#12864) (#21095)

[upstream:2cabee584b77ec9895995b852101ae2b03853cff]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jan 30, 2025
1 parent d441225 commit 1577c15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/12864.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: allow parallelization of `google_compute_per_instance_config` and `google_compute_region_per_instance_config` deletions by not locking on the parent resource, but including instance name.
```
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func resourceComputePerInstanceConfigDelete(d *schema.ResourceData, meta interfa
return err
}

lockName, err := tpgresource.ReplaceVars(d, config, "instanceGroupManager/{{project}}/{{zone}}/{{instance_group_manager}}")
lockName, err := tpgresource.ReplaceVars(d, config, "instanceGroupManager/{{project}}/{{zone}}/{{instance_group_manager}}/{{name}}")
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func resourceComputeRegionPerInstanceConfigDelete(d *schema.ResourceData, meta i
return err
}

lockName, err := tpgresource.ReplaceVars(d, config, "instanceGroupManager/{{project}}/{{region}}/{{region_instance_group_manager}}")
lockName, err := tpgresource.ReplaceVars(d, config, "instanceGroupManager/{{project}}/{{region}}/{{region_instance_group_manager}}/{{name}}")
if err != nil {
return err
}
Expand Down

0 comments on commit 1577c15

Please sign in to comment.