Juniper / terraform-provider-apstra

Apstra Terraform Provider
Apache License 2.0
16 stars 2 forks source link

Apstra-Freform-link with aggregate_link_id report bug provider #821

Open ihadi581 opened 2 months ago

ihadi581 commented 2 months ago

After triying create link freeform with aggreation terafrom apply reporting bug.

this example configuration tf.

resource "apstra_freeform_link" "lf-dc1-01_vmx_client" {
  blueprint_id = apstra_freeform_blueprint.dc1.id
  name         = "LF_LAB_DC1_01<>vMX_Client_DC"
  tags         = null
  aggregate_link_id = "CHBxldZdvAT5uEhxmao"
  endpoints    = {
      "${apstra_freeform_system.lf-dc1-01.id}"   = {
            interface_name    = "et-0/0/2:0"
            ipv4_address      = null
            transformation_id = 12
       },
       "${apstra_freeform_system.vmx_client.id}" = {
            interface_name    = null
            ipv4_address      = null
            transformation_id = null
            }
      }
}

this error bug :

apstra_freeform_link.lf-dc1-01_vmx_client: Destroying... [id=xwp3dw-EqJWKOGiKImo]
apstra_freeform_link.lf-dc1-01_vmx_client: Destruction complete after 5s
apstra_freeform_link.lf-dc1-01_vmx_client: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to apstra_freeform_link.lf-dc1-01_vmx_client, provider "provider[\"registry.terraform.io/juniper/apstra\"]" produced an unexpected new value: .aggregate_link_id: was
│ cty.StringVal("CHBxldZdvAT5uEhxmao"), but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
chrismarget-j commented 2 months ago

Hi @ihadi581, thank you for opening this issue.

aggregate_link_id was intended to be a read-only field: If the link is (or becomes?) a member of an aggregation, then this field will display the ID of the parent LAG.

That you're allowed to enter a value here is a bug.

This terraform provider doesn't currently support creation of LAGs in Freeform Blueprints. I think we intended to add that as a separate resource. Maybe something like:

resource "apstra_freeform_aggregate_link" "example" {
  name = ""
  member_link_ids = []
}

edit: I'm probably confused about this. Need to talk to Bill when he's online in a couple of hours to refresh my memory.

Is LAG support something you require for your project?

ihadi581 commented 2 months ago

Hi @chrismarget-j,

yes of course, i need LAG links between spine <> leaf and leaf <> external.