Skip to content

Terraform wants to change mac address on reapply #112

@cospeedster

Description

@cospeedster

Problem

When I plan the second run of terraform, it want to change the network blocks:

...

      + network {
          + bridge    = "vmbr0"
          + firewall  = false
          + id        = 0
          + link_down = false
          + model     = "virtio"
          + queues    = -1
          + rate      = -1
          + tag       = 2101
        }
      - network {
          - bridge    = "vmbr0" -> null
          - firewall  = false -> null
          - id        = 0 -> null
          - link_down = false -> null
          - macaddr   = "42:CE:92:97:95:4B" -> null
          - model     = "virtio" -> null
          - queues    = -1 -> null
          - rate      = -1 -> null
          - tag       = 2101 -> null
        }
      + network {
          + macaddr = "42:CE:92:97:95:4B"
        }
    }

Plan: 0 to add, 2 to change, 0 to destroy.

Maybe this Issue has same cause for Issue #47. @ggongaware Mentioned this here #47 (comment).

Work around

For a work around I added this to my resource:

  # For some reason terraform has changes on reapply
  lifecycle {
    ignore_changes = [
      network,
    ]
  }

I don't know how I can just ignore changes on mac addresses.

Any Ideas there so far?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions