provider/azurerm: Do not pass an empty string of license_type to AMR VMs (#10564)

This commit is contained in:
Paul Stack 2016-12-07 00:43:18 +01:00 committed by GitHub
parent fde474d2f3
commit 30240ff836
1 changed files with 5 additions and 2 deletions

View File

@ -488,14 +488,17 @@ func resourceArmVirtualMachineCreate(d *schema.ResourceData, meta interface{}) e
networkProfile := expandAzureRmVirtualMachineNetworkProfile(d)
vmSize := d.Get("vm_size").(string)
licenseType := d.Get("license_type").(string)
properties := compute.VirtualMachineProperties{
NetworkProfile: &networkProfile,
HardwareProfile: &compute.HardwareProfile{
VMSize: compute.VirtualMachineSizeTypes(vmSize),
},
StorageProfile: &storageProfile,
LicenseType: &licenseType,
}
if v, ok := d.GetOk(""); ok {
license := v.(string)
properties.LicenseType = &license
}
if _, ok := d.GetOk("boot_diagnostics"); ok {