provider/azurerm: Do not pass an empty string of license_type to AMR VMs (#10564)
This commit is contained in:
parent
fde474d2f3
commit
30240ff836
|
@ -488,14 +488,17 @@ func resourceArmVirtualMachineCreate(d *schema.ResourceData, meta interface{}) e
|
||||||
|
|
||||||
networkProfile := expandAzureRmVirtualMachineNetworkProfile(d)
|
networkProfile := expandAzureRmVirtualMachineNetworkProfile(d)
|
||||||
vmSize := d.Get("vm_size").(string)
|
vmSize := d.Get("vm_size").(string)
|
||||||
licenseType := d.Get("license_type").(string)
|
|
||||||
properties := compute.VirtualMachineProperties{
|
properties := compute.VirtualMachineProperties{
|
||||||
NetworkProfile: &networkProfile,
|
NetworkProfile: &networkProfile,
|
||||||
HardwareProfile: &compute.HardwareProfile{
|
HardwareProfile: &compute.HardwareProfile{
|
||||||
VMSize: compute.VirtualMachineSizeTypes(vmSize),
|
VMSize: compute.VirtualMachineSizeTypes(vmSize),
|
||||||
},
|
},
|
||||||
StorageProfile: &storageProfile,
|
StorageProfile: &storageProfile,
|
||||||
LicenseType: &licenseType,
|
}
|
||||||
|
|
||||||
|
if v, ok := d.GetOk(""); ok {
|
||||||
|
license := v.(string)
|
||||||
|
properties.LicenseType = &license
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := d.GetOk("boot_diagnostics"); ok {
|
if _, ok := d.GetOk("boot_diagnostics"); ok {
|
||||||
|
|
Loading…
Reference in New Issue