Skip to content

Commit

Permalink
provider/azurerm: Do not pass an empty string of license_type to AMR …
Browse files Browse the repository at this point in the history
…VMs (#10564)
  • Loading branch information
stack72 authored Dec 6, 2016
1 parent fde474d commit 30240ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions builtin/providers/azurerm/resource_arm_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 30240ff

Please sign in to comment.