mirror of
https://github.com/letic/terraform-provider-proxmox.git
synced 2024-07-03 08:02:39 +00:00
change "macaddr" to behave like original "mac"
This commit is contained in:
parent
414c2fc749
commit
bf98b941f7
|
@ -91,7 +91,13 @@ func resourceVmQemu() *schema.Resource {
|
||||||
"macaddr": &schema.Schema{
|
"macaddr": &schema.Schema{
|
||||||
// TODO: Find a way to set MAC address in .tf config.
|
// TODO: Find a way to set MAC address in .tf config.
|
||||||
Type: schema.TypeString,
|
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{
|
"bridge": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user