Skip to content

Commit

Permalink
set data_disks in all cases if feature is toggled on
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops committed Feb 15, 2021
1 parent 4c1e7f5 commit b28a4fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -665,13 +665,11 @@ func resourceLinuxVirtualMachineRead(d *schema.ResourceData, meta interface{}) e
}

if features.VMDataDiskBeta() {
if profile.DataDisks != nil {
dataDisks, err := flattenVirtualMachineDataDisks(profile.DataDisks)
if err != nil {
return err
}
d.Set("data_disks", dataDisks)
dataDisks, err := flattenVirtualMachineDataDisks(profile.DataDisks)
if err != nil {
return err
}
d.Set("data_disks", dataDisks)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,11 @@ func resourceWindowsVirtualMachineRead(d *schema.ResourceData, meta interface{})
}

if features.VMDataDiskBeta() {
if props.StorageProfile.DataDisks != nil {
dataDisks, err := flattenVirtualMachineDataDisks(props.StorageProfile.DataDisks)
if err != nil {
return err
}
d.Set("data_disks", dataDisks)
dataDisks, err := flattenVirtualMachineDataDisks(props.StorageProfile.DataDisks)
if err != nil {
return err
}
d.Set("data_disks", dataDisks)
}
}

Expand Down

0 comments on commit b28a4fb

Please sign in to comment.