Skip to content

Imported Bridge Domains loose relationship to VRF #80

@camrossi

Description

@camrossi

Steps to reproduce:

Create a BD and map it to a VRF:

resource "aci_vrf" "vrf" {
  tenant_dn = aci_tenant.tenant.id
  name      = "vrf"
}


resource "aci_bridge_domain" "bd" {
  tenant_dn = aci_tenant.tenant.id
  name      = "bd1"
  unicast_route = "yes"
  relation_fv_rs_ctx = aci_vrf.vrf.id
}

This will create a BD that looks like:
image

Import the tenant:
./terraformer-aci import aci --resources=\* --parent-dn=$TENANT --path-pattern {output}/{provider}/ --compact -o $TMP_STATE

The BD state looses the relationship:

resource "aci_bridge_domain" "tfer--fvBD_bd1_29" {
  annotation                     = "orchestrator:terraform"
  arp_flood                      = "no"
  bridge_domain_type             = "regular"
  description                    = ""
  ep_clear                       = "no"
  ep_move_detect_mode            = "disable"
  host_based_routing             = "no"
  intersite_bum_traffic_allow    = "no"
  intersite_l2_stretch           = "no"
  ip_learning                    = "yes"
  ipv6_mcast_allow               = "no"
  limit_ip_learn_to_subnets      = "yes"
  ll_addr                        = "::"
  mac                            = "00:22:BD:F8:19:FF"
  mcast_allow                    = "no"
  multi_dst_pkt_act              = "bd-flood"
  name                           = "bd1"
  name_alias                     = ""
  optimize_wan_bandwidth         = "no"
  relation_fv_rs_abd_pol_mon_pol = ""
  relation_fv_rs_bd_to_ep_ret    = ""
  relation_fv_rs_bd_to_fhs       = ""
  relation_fv_rs_bd_to_nd_p      = ""
  relation_fv_rs_bd_to_profile   = ""
  relation_fv_rs_bd_to_relay_p   = ""
  relation_fv_rs_ctx             = ""  <=== this should point to my VRF 
  relation_fv_rs_igmpsn          = ""
  relation_fv_rs_mldsn           = ""
  tenant_dn                      = "${data.terraform_remote_state.local.outputs.aci_tenant_tfer--fvTenant_terraformDrift_19_id}"
  unicast_route                  = "yes"
  unk_mac_ucast_act              = "proxy"
  unk_mcast_act                  = "flood"
  v6unk_mcast_act                = "flood"
  vmac                           = "not-applicable"
}```

If I now delete and recreate the BD with tf plan and apply the BD will pick the default VRF in the common tenant. 

![image](https://user-images.githubusercontent.com/16535101/176322189-0839d3e0-bb6d-43b7-be07-a60d83e745e8.png)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions