Skip to content

Commit

Permalink
Remove source from instance from machine image (#5457) (#3855)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Nov 16, 2021
1 parent 90a3900 commit 62c426c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/5457.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed a bug that would cause `google_instance_from_machine_image` to fail with a resourceInUseByAnotherResource error
```
3 changes: 0 additions & 3 deletions google-beta/resource_compute_instance_from_machine_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ func adjustInstanceFromMachineImageDisks(d *schema.ResourceData, config *Config,
for _, disk := range mi.SourceInstanceProperties.Disks {
if disk.Boot {
newdisk := &compute.AttachedDisk{
Source: disk.Source,
AutoDelete: disk.AutoDelete,
Type: disk.Type,
DeviceName: disk.DeviceName,
Expand All @@ -235,7 +234,6 @@ func adjustInstanceFromMachineImageDisks(d *schema.ResourceData, config *Config,
for _, disk := range mi.SourceInstanceProperties.Disks {
if disk.Type == "SCRATCH" {
newdisk := &compute.AttachedDisk{
Source: disk.Source,
AutoDelete: disk.AutoDelete,
Type: disk.Type,
DeviceName: disk.DeviceName,
Expand All @@ -261,7 +259,6 @@ func adjustInstanceFromMachineImageDisks(d *schema.ResourceData, config *Config,
for _, disk := range mi.SourceInstanceProperties.Disks {
if !disk.Boot && disk.Type != "SCRATCH" {
newdisk := &compute.AttachedDisk{
Source: disk.Source,
AutoDelete: disk.AutoDelete,
Type: disk.Type,
DeviceName: disk.DeviceName,
Expand Down

0 comments on commit 62c426c

Please sign in to comment.