Normalizes availability_set_id to lowercase to avoid spurious diffs (#6768)
This commit is contained in:
parent
58e1c94335
commit
b33bd427e1
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/arm/compute"
|
||||
|
@ -69,6 +70,9 @@ func resourceArmVirtualMachine() *schema.Resource {
|
|||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
StateFunc: func(id interface{}) string {
|
||||
return strings.ToLower(id.(string))
|
||||
},
|
||||
},
|
||||
|
||||
"license_type": &schema.Schema{
|
||||
|
@ -480,7 +484,7 @@ func resourceArmVirtualMachineRead(d *schema.ResourceData, meta interface{}) err
|
|||
}
|
||||
|
||||
if resp.Properties.AvailabilitySet != nil {
|
||||
d.Set("availability_set_id", resp.Properties.AvailabilitySet.ID)
|
||||
d.Set("availability_set_id", strings.ToLower(*resp.Properties.AvailabilitySet.ID))
|
||||
}
|
||||
|
||||
d.Set("vm_size", resp.Properties.HardwareProfile.VMSize)
|
||||
|
|
Loading…
Reference in New Issue