Skip to content

[Bug]: port redundancy priority gets set automatically and reset to null, not allowed to be set explicitly #822

@nickzxcv

Description

@nickzxcv

Terraform Version

0.14.9

Equinix Provider Version

equinix/equinix v2.10.0

Effected Terraform Resources

equinix_fabric_connection

Terraform Config Files

resource "equinix_fabric_connection" "gcpi-ecx" {
  count             = var.number_of_interconnects
  depends_on        = [google_compute_interconnect_attachment.partner]
  name              = "gcp-${var.name}-${var.gcp_interconnect_region}-${count.index}"
  type              = "EVPL_VC"
  notifications     {
    type = "ALL"
    emails = var.ecx_notifications_list
  }
  bandwidth         = var.ecx_interconnect_speed
  a_side            {
    access_point {
      type = "COLO"
      port {
        uuid = count.index % 2 == 0 ? data.equinix_fabric_ports.ecx-primary-port.id : data.equinix_fabric_ports.ecx-secondary-port.id
        redundancy {
          priority = count.index % 2 == 0 ? "PRIMARY" : "SECONDARY"
        }
      }
      link_protocol {
        type = "DOT1Q"
        vlan_tag = var.base_vlan_id + count.index
      }
    }
  }
  z_side            {
    access_point {
      type = "SP"
      authentication_key = google_compute_interconnect_attachment.partner[count.index].pairing_key
      seller_region = var.gcp_interconnect_region
      profile {
        type = "L2_PROFILE"
        uuid = count.index % 2 == 0 ? data.equinix_fabric_service_profiles.gcpi-1.data.0.uuid : data.equinix_fabric_service_profiles.gcpi-2.data.0.uuid
      }
      location {
        metro_code = var.equinix_metro_code
      }
    }
  }
}

Debug Output

No response

Panic Output

No response

Expected Behavior

priority doesn't get reset to null according to the state and then set automatically again after each apply

Actual Behavior

explicitly setting priority gives this error

Error: Value for unconfigurable attribute

  on main.tf line 104, in resource "equinix_fabric_connection" "gcpi-ecx":
 104: resource "equinix_fabric_connection" "gcpi-ecx" {

Can't configure a value for "a_side.0.access_point.0.port.0.redundancy": its
value will be decided automatically based on the result of applying this
configuration.

Not setting redundancy priority causes this to happen on every apply

  # equinix_fabric_connection.gcpi-ecx[0] will be updated in-place
  ~ resource "equinix_fabric_connection" "gcpi-ecx" {
        id         = "3f83e086-cfb3-438d-a35c-e8497c5e6f5a"
        name       = "gcp-test-us-east4-0"
        # (10 unchanged attributes hidden)





      - redundancy {
          - group    = "d620cf98-c6ea-4839-a290-3c6d0822467a" -> null
          - priority = "PRIMARY" -> null
        }

        # (5 unchanged blocks hidden)
    }

  # equinix_fabric_connection.gcpi-ecx[1] will be updated in-place
  ~ resource "equinix_fabric_connection" "gcpi-ecx" {
        id         = "8c039bd0-8faf-49ef-b0d1-a2be37b01869"
        name       = "gcp-test-us-east4-1"
        # (10 unchanged attributes hidden)





      - redundancy {
          - group    = "9172477e-0a31-4c6b-9db2-3d7bf68df850" -> null
          - priority = "PRIMARY" -> null
        }

        # (5 unchanged blocks hidden)
    }

Steps to Reproduce

Create equinix_fabric_connection resources with or without setting redundancy for each connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions