Skip to content

Commit

Permalink
change "macaddr" to behave like original "mac"
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Gongaware committed Mar 7, 2019
1 parent 414c2fc commit bf98b94
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ func resourceVmQemu() *schema.Resource {
"macaddr": &schema.Schema{
// TODO: Find a way to set MAC address in .tf config.
Type: schema.TypeString,
Computed: true,
Optional: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
if new == "" {
return true // macaddr auto-generates and its ok
}
return strings.TrimSpace(old) == strings.TrimSpace(new)
},
},
"bridge": &schema.Schema{
Type: schema.TypeString,
Expand Down

0 comments on commit bf98b94

Please sign in to comment.