always need both name and description when updating

This commit is contained in:
Jon Perritt 2015-01-26 12:59:38 -07:00
parent 2214331b3c
commit d51ee3111e
1 changed files with 3 additions and 6 deletions

View File

@ -92,12 +92,9 @@ func resourceComputeSecGroupV2Update(d *schema.ResourceData, meta interface{}) e
return fmt.Errorf("Error creating OpenStack compute client: %s", err)
}
var updateOpts secgroups.UpdateOpts
if d.HasChange("name") {
updateOpts.Name = d.Get("name").(string)
}
if d.HasChange("description") {
updateOpts.Description = d.Get("description").(string)
updateOpts := secgroups.UpdateOpts{
Name: d.Get("name").(string),
Description: d.Get("description").(string),
}
log.Printf("[DEBUG] Updating Security Group (%s) with options: %+v", d.Id(), updateOpts)