Skip to content

Commit

Permalink
Fix typos causing panic on userdata change, ForceNew on change (API d…
Browse files Browse the repository at this point in the history
…isallows anyways)
  • Loading branch information
rxacevedo authored and marinsalinas committed Aug 7, 2019
1 parent 91d0da3 commit d590c78
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nutanix/resource_nutanix_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,13 @@ func resourceNutanixVirtualMachine() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"guest_customization_cloud_init_meta_data": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"guest_customization_cloud_init_custom_key_values": {
Type: schema.TypeMap,
Expand All @@ -575,6 +577,7 @@ func resourceNutanixVirtualMachine() *schema.Resource {
Type: schema.TypeMap,
Optional: true,
Computed: true,
ForceNew: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"install_type": {
Expand All @@ -594,6 +597,7 @@ func resourceNutanixVirtualMachine() *schema.Resource {
Type: schema.TypeMap,
Optional: true,
Computed: true,
ForceNew: true,
},
"should_fail_on_script_failure": {
Type: schema.TypeBool,
Expand Down Expand Up @@ -1111,12 +1115,12 @@ func resourceNutanixVirtualMachineUpdate(d *schema.ResourceData, meta interface{
}

if d.HasChange("guest_customization_cloud_init_user_data") {
_, n := d.GetChange("guest_customization_user_data")
_, n := d.GetChange("guest_customization_cloud_init_user_data")
cloudInit.UserData = utils.StringPtr(n.(string))
}

if d.HasChange("guest_customization_cloud_init_meta_data") {
_, n := d.GetChange("guest_customization_meta_data")
_, n := d.GetChange("guest_customization_cloud_init_meta_data")
cloudInit.MetaData = utils.StringPtr(n.(string))
}

Expand Down

0 comments on commit d590c78

Please sign in to comment.