// Code generated by "gen/generator.go"; DO NOT EDIT.
// In order to regenerate this file execute `go generate` from the repository root.
// More details can be found in the [README](https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/README.md).

package provider

import (
	"regexp"
	"testing"

	"github.com/hashicorp/terraform-plugin-testing/helper/resource"
	"github.com/hashicorp/terraform-plugin-testing/knownvalue"
	"github.com/hashicorp/terraform-plugin-testing/statecheck"
	"github.com/hashicorp/terraform-plugin-testing/tfjsonpath"
)

func TestAccResourceFvBDWithFvTenant(t *testing.T) {

	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t, "apic", "1.0(1e)-") },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			// Create with minimum config and verify default APIC values
			{
				Config:             testConfigFvBDMinDependencyWithFvTenantAllowExisting + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "unicast_routing", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "unicast_routing", "yes"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "advertise_host_routes", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "ipv6_l3_unknown_multicast_flooding", "flood"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "pim_ipv6", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "drop_arp_with_multicast_smac", "yes"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "drop_arp_with_multicast_smac", "yes")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "service_bd_routing_disable", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "segment"),
				),
			},
		},
	})

	setEnvVariable(t, "ACI_ALLOW_EXISTING_ON_CREATE", "false")
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t, "apic", "1.0(1e)-") },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			// Create with minimum config and verify default APIC values
			{
				Config:      testConfigFvBDMinDependencyWithFvTenantAllowExisting + testConfigDataSourceSystem,
				ExpectError: regexp.MustCompile("Object Already Exists"),
			},
		},
	})

	setEnvVariable(t, "ACI_ALLOW_EXISTING_ON_CREATE", "true")
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t, "apic", "1.0(1e)-") },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			// Create with minimum config and verify default APIC values
			{
				Config:             testConfigFvBDMinDependencyWithFvTenantAllowExisting + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "unicast_routing", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "unicast_routing", "yes"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "advertise_host_routes", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "ipv6_l3_unknown_multicast_flooding", "flood"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "pim_ipv6", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "drop_arp_with_multicast_smac", "yes"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "drop_arp_with_multicast_smac", "yes")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "service_bd_routing_disable", "no"),
						resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttr("aci_bridge_domain.allow_test_2", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test_2", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test_2", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test", "segment"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.allow_test_2", "segment"),
				),
			},
		},
	})

	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t, "apic", "1.0(1e)-") },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			// Create with minimum config and verify default APIC values
			{
				Config:             testConfigFvBDMinDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "unicast_routing", "yes"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "drop_arp_with_multicast_smac", "yes")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
				),
			},
			// Update with all config and verify default APIC values
			{
				Config:             testConfigFvBDAllDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotation", "annotation"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "bridge_domain_type", "fc"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "custom_mac_address", "00:22:BD:F8:19:FE"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "description", "description_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "endpoint_move_detection_mode", "garp"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "ip_learning", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "link_local_ipv6_address", "fe80::1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name_alias", "name_alias_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_key", "owner_key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_tag", "owner_tag_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "unicast_routing", "no"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "drop_arp_with_multicast_smac", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "virtual_mac_address", "00:22:BD:F8:19:FB"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
				),
			},
			// Update with minimum config and verify config is unchanged
			{
				Config:             testConfigFvBDMinDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name", "test_name"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
				),
			},
			// Update with empty strings config or default value
			{
				Config:             testConfigFvBDResetDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "unicast_routing", "yes"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "drop_arp_with_multicast_smac", "yes")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
				),
			},
			// Import testing
			{
				ResourceName:      "aci_bridge_domain.test",
				ImportState:       true,
				ImportStateVerify: true,
			},
			// Update with children
			{
				Config:             testConfigFvBDChildrenDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name", "test_name"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotation", "orchestrator:terraform"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "arp_flooding", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "bridge_domain_type", "regular"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "clear_remote_mac_entries", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "custom_mac_address", "00:22:BD:F8:19:FF"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "description", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "enable_intersite_bum_traffic", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "endpoint_move_detection_mode", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "intersite_l2_stretch", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "ip_learning", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l2_unknown_unicast_flooding", "proxy"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "l3_unknown_multicast_flooding", "flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "limit_ip_learn_to_subnets", "yes"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "link_local_ipv6_address", "::"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "multi_destination_flooding", "bd-flood"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "name_alias", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "optimize_wan_bandwidth", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_key", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "owner_tag", ""),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim", "no"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "unicast_routing", "yes"),
					composeAggregateTestCheckFuncWithVersion(t, "4.0(1h)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "advertise_host_routes", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "4.1(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "ipv6_l3_unknown_multicast_flooding", "flood")),
					composeAggregateTestCheckFuncWithVersion(t, "4.2(1i)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "pim_ipv6", "no")),
					composeAggregateTestCheckFuncWithVersion(t, "5.2(5c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "drop_arp_with_multicast_smac", "yes")),
					composeAggregateTestCheckFuncWithVersion(t, "6.0(4c)-", "inside",
						resource.TestCheckResourceAttr("aci_bridge_domain.test", "service_bd_routing_disable", "no")),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "virtual_mac_address", "not-applicable"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.description", "description_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.encapsulation", "vlan-100"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.name", "name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.name_alias", "name_alias_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.owner_key", "owner_key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.owner_tag", "owner_tag_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.dhcp_relay_policy_name", "dhcp_relay_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.end_point_retention_policy_name", "end_point_retention_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.resolve_action", "inherit"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.first_hop_security_policy_name", "first_hop_security_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.igmp_snooping_policy_name", "igmp_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.l3_outside_name", "l3_outside_name_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.l3_outside_name", "l3_outside_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.mld_snooping_policy_name", "mld_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.monitoring_policy_name", "monitoring_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.neighbor_discovery_interface_policy_name", "neighbor_discovery_interface_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.filter_type", "ce"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.netflow_monitor_policy_name", "netflow_monitor_policy_name_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.filter_type", "ipv4"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.netflow_monitor_policy_name", "netflow_monitor_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.l3_outside_name", "l3_outside_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.route_control_profile_name", "route_control_profile_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.vrf_name", "vrf_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.description", "description_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.mac", "00:00:00:00:00:03"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name", "name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name_alias", "name_alias_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.description", "description_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.mac", "00:00:00:00:00:01"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.name", "name_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.name_alias", "name_alias_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.1.value", "test_value"),
				),
			},
			// Refresh State before import testing to ensure that the state is up to date
			{
				RefreshState:       true,
				ExpectNonEmptyPlan: false,
			},
			// Import testing with children
			{
				ResourceName:      "aci_bridge_domain.test",
				ImportState:       true,
				ImportStateVerify: true,
			},
			// Update with children removed from config
			{
				Config:             testConfigFvBDChildrenRemoveFromConfigDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.description", "description_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.encapsulation", "vlan-100"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.name", "name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.name_alias", "name_alias_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.owner_key", "owner_key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "legacy_mode.owner_tag", "owner_tag_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_dhcp_relay_policy.dhcp_relay_policy_name", "dhcp_relay_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.end_point_retention_policy_name", "end_point_retention_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.resolve_action", "inherit"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_first_hop_security_policy.first_hop_security_policy_name", "first_hop_security_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.igmp_snooping_policy_name", "igmp_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.l3_outside_name", "l3_outside_name_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.1.l3_outside_name", "l3_outside_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.mld_snooping_policy_name", "mld_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_monitoring_policy.monitoring_policy_name", "monitoring_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.neighbor_discovery_interface_policy_name", "neighbor_discovery_interface_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.filter_type", "ce"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.netflow_monitor_policy_name", "netflow_monitor_policy_name_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.filter_type", "ipv4"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.1.netflow_monitor_policy_name", "netflow_monitor_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.l3_outside_name", "l3_outside_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_route_control_profile.route_control_profile_name", "route_control_profile_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.vrf_name", "vrf_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.description", "description_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.mac", "00:00:00:00:00:03"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name", "name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name_alias", "name_alias_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotations.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotations.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotations.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.annotations.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.description", "description_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.mac", "00:00:00:00:00:01"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.name", "name_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.1.name_alias", "name_alias_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.#", "2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.key", "key_0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.value", "value_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.1.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.1.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "2"),
				),
			},
			// Update with children first child removed
			{
				Config:             testConfigFvBDChildrenRemoveOneDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.end_point_retention_policy_name", "end_point_retention_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.resolve_action", "inherit"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.igmp_snooping_policy_name", "igmp_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.0.l3_outside_name", "l3_outside_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.mld_snooping_policy_name", "mld_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.neighbor_discovery_interface_policy_name", "neighbor_discovery_interface_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.filter_type", "ipv4"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.0.netflow_monitor_policy_name", "netflow_monitor_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.vrf_name", "vrf_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotation", "annotation_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.annotations.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.tags.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.description", "description_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.mac", "00:00:00:00:00:01"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name", "name_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.0.name_alias", "name_alias_2"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.#", "1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.key", "key_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.0.value", "test_value"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "1"),
				),
				ConfigStateChecks: []statecheck.StateCheck{
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("legacy_mode"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":    knownvalue.Null(),
								"annotations":   knownvalue.Null(),
								"tags":          knownvalue.Null(),
								"description":   knownvalue.Null(),
								"encapsulation": knownvalue.Null(),
								"name":          knownvalue.Null(),
								"name_alias":    knownvalue.Null(),
								"owner_key":     knownvalue.Null(),
								"owner_tag":     knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_dhcp_relay_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":             knownvalue.Null(),
								"annotations":            knownvalue.Null(),
								"tags":                   knownvalue.Null(),
								"dhcp_relay_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_first_hop_security_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":                     knownvalue.Null(),
								"annotations":                    knownvalue.Null(),
								"tags":                           knownvalue.Null(),
								"first_hop_security_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_monitoring_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":             knownvalue.Null(),
								"annotations":            knownvalue.Null(),
								"tags":                   knownvalue.Null(),
								"monitoring_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_route_control_profile"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":                 knownvalue.Null(),
								"annotations":                knownvalue.Null(),
								"tags":                       knownvalue.Null(),
								"l3_outside_name":            knownvalue.Null(),
								"route_control_profile_name": knownvalue.Null(),
							},
						),
					),
				},
			},
			// Update with all children removed
			{
				Config:             testConfigFvBDChildrenRemoveAllDependencyWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
				Check: resource.ComposeAggregateTestCheckFunc(
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "pc_tag"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "scope"),
					resource.TestCheckResourceAttrSet("aci_bridge_domain.test", "segment"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.tags.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.end_point_retention_policy_name", "end_point_retention_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_end_point_retention_policy.resolve_action", "inherit"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.tags.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_igmp_snooping_policy.igmp_snooping_policy_name", "igmp_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_l3_outsides.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.tags.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_mld_snooping_policy.mld_snooping_policy_name", "mld_snooping_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.tags.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_neighbor_discovery_interface_policy.neighbor_discovery_interface_policy_name", "neighbor_discovery_interface_policy_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_netflow_monitor_policies.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotation", "annotation_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.annotations.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.tags.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "relation_to_vrf.vrf_name", "vrf_name_1"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "rogue_coop_exceptions.#", "0"),
					resource.TestCheckResourceAttr("aci_bridge_domain.test", "tags.#", "0"),
				),
				ConfigStateChecks: []statecheck.StateCheck{
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("legacy_mode"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":    knownvalue.Null(),
								"annotations":   knownvalue.Null(),
								"tags":          knownvalue.Null(),
								"description":   knownvalue.Null(),
								"encapsulation": knownvalue.Null(),
								"name":          knownvalue.Null(),
								"name_alias":    knownvalue.Null(),
								"owner_key":     knownvalue.Null(),
								"owner_tag":     knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_dhcp_relay_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":             knownvalue.Null(),
								"annotations":            knownvalue.Null(),
								"tags":                   knownvalue.Null(),
								"dhcp_relay_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_first_hop_security_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":                     knownvalue.Null(),
								"annotations":                    knownvalue.Null(),
								"tags":                           knownvalue.Null(),
								"first_hop_security_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_monitoring_policy"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":             knownvalue.Null(),
								"annotations":            knownvalue.Null(),
								"tags":                   knownvalue.Null(),
								"monitoring_policy_name": knownvalue.Null(),
							},
						),
					),
					statecheck.ExpectKnownValue("aci_bridge_domain.test",
						tfjsonpath.New("relation_to_route_control_profile"),
						knownvalue.MapExact(
							map[string]knownvalue.Check{
								"annotation":                 knownvalue.Null(),
								"annotations":                knownvalue.Null(),
								"tags":                       knownvalue.Null(),
								"l3_outside_name":            knownvalue.Null(),
								"route_control_profile_name": knownvalue.Null(),
							},
						),
					),
				},
			},
			// Update with legacy attribute config
			{
				Config:             testConfigFvBDLegacyAttributesWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
			},
		},
		CheckDestroy: testCheckResourceDestroy,
	})
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t, "apic", "1.0(1e)-") },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			// Create with legacy attribute config
			{
				Config:             testConfigFvBDLegacyAttributesWithFvTenant + testConfigDataSourceSystem,
				ExpectNonEmptyPlan: false,
			},
		},
		CheckDestroy: testCheckResourceDestroy,
	})
}

const testChildDependencyConfigFvBD = `
resource "aci_monitoring_policy" "test_monitoring_policy_0"{
  tenant_dn = aci_tenant.test.id
  name = "monitoring_policy_name_1"
}
resource "aci_first_hop_security_policy" "test_first_hop_security_policy_1"{
  parent_dn = aci_tenant.test.id
  name = "first_hop_security_policy_name_1"
}
resource "aci_neighbor_discovery_interface_policy" "test_neighbor_discovery_interface_policy_0"{
  parent_dn = aci_tenant.test.id
  name = "neighbor_discovery_interface_policy_name_1"
}
resource "aci_netflow_monitor_policy" "test_netflow_monitor_policy_1"{
  parent_dn = aci_tenant.test.id
  name = "netflow_monitor_policy_name_1"
}
resource "aci_vrf" "test_vrf_0"{
  tenant_dn = aci_tenant.test.id
  name = "vrf_name_1"
}
resource "aci_l3_outside" "test_l3_outside_1"{
  tenant_dn = aci_tenant.test.id
  name = "l3_outside_name_1"
  relation_l3ext_rs_ectx = aci_vrf.test_vrf_0.id
}
resource "aci_l3_outside" "test_l3_outside_0"{
  tenant_dn = aci_tenant.test.id
  name = "l3_outside_name_0"
  relation_l3ext_rs_ectx = aci_vrf.test_vrf_0.id
}
resource "aci_route_control_profile" "test_route_control_profile_1"{
  parent_dn = aci_l3_outside.test_l3_outside_0.id
  name = "route_control_profile_name_1"
}
resource "aci_dhcp_relay_policy" "test_dhcp_relay_policy_0"{
  tenant_dn = aci_tenant.test.id
  name = "dhcp_relay_policy_name_1"
}
resource "aci_end_point_retention_policy" "test_end_point_retention_policy_1"{
  tenant_dn = aci_tenant.test.id
  name = "end_point_retention_policy_name_1"
}
resource "aci_igmp_snooping_policy" "test_igmp_snooping_policy_0"{
  parent_dn = aci_tenant.test.id
  name = "igmp_snooping_policy_name_1"
}
resource "aci_mld_snooping_policy" "test_mld_snooping_policy_1"{
  parent_dn = aci_tenant.test.id
  name = "mld_snooping_policy_name_1"
}
`

const testConfigFvBDMinDependencyWithFvTenantAllowExisting = testConfigFvTenantMin + `
resource "aci_bridge_domain" "allow_test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
}
resource "aci_bridge_domain" "allow_test_2" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  depends_on = [aci_bridge_domain.allow_test]
}
`

const testConfigFvBDMinDependencyWithFvTenant = testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
}
`

const testConfigFvBDAllDependencyWithFvTenant = testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  annotation = "annotation"
  arp_flooding = "no"
  bridge_domain_type = "fc"
  clear_remote_mac_entries = "no"
  custom_mac_address = "00:22:BD:F8:19:FE"
  description = "description_1"
  enable_intersite_bum_traffic = "no"
  endpoint_move_detection_mode = "garp"
  intersite_l2_stretch = "no"
  ip_learning = "no"
  l2_unknown_unicast_flooding = "proxy"
  l3_unknown_multicast_flooding = "flood"
  limit_ip_learn_to_subnets = "yes"
  link_local_ipv6_address = "fe80::1"
  multi_destination_flooding = "bd-flood"
  name_alias = "name_alias_1"
  optimize_wan_bandwidth = "no"
  owner_key = "owner_key_1"
  owner_tag = "owner_tag_1"
  pim = "no"
  unicast_routing = "no"
  advertise_host_routes = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.0(1h)-") ? "no" : null
  ipv6_l3_unknown_multicast_flooding = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.1(1i)-") ? "flood" : null
  pim_ipv6 = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.2(1i)-") ? "no" : null
  drop_arp_with_multicast_smac = provider::aci::compare_versions(data.aci_system.version.version,"inside","5.2(5c)-") ? "no" : null
  service_bd_routing_disable = provider::aci::compare_versions(data.aci_system.version.version,"inside","6.0(4c)-") ? "no" : null
  virtual_mac_address = "00:22:BD:F8:19:FB"
}
`

const testConfigFvBDResetDependencyWithFvTenant = testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  annotation = "orchestrator:terraform"
  arp_flooding = "no"
  bridge_domain_type = "regular"
  clear_remote_mac_entries = "no"
  custom_mac_address = "00:22:BD:F8:19:FF"
  description = ""
  enable_intersite_bum_traffic = "no"
  endpoint_move_detection_mode = ""
  intersite_l2_stretch = "no"
  ip_learning = "yes"
  l2_unknown_unicast_flooding = "proxy"
  l3_unknown_multicast_flooding = "flood"
  limit_ip_learn_to_subnets = "yes"
  link_local_ipv6_address = "::"
  multi_destination_flooding = "bd-flood"
  name_alias = ""
  optimize_wan_bandwidth = "no"
  owner_key = ""
  owner_tag = ""
  pim = "no"
  unicast_routing = "yes"
  advertise_host_routes = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.0(1h)-") ? "no" : null
  ipv6_l3_unknown_multicast_flooding = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.1(1i)-") ? "flood" : null
  pim_ipv6 = provider::aci::compare_versions(data.aci_system.version.version,"inside","4.2(1i)-") ? "no" : null
  drop_arp_with_multicast_smac = provider::aci::compare_versions(data.aci_system.version.version,"inside","5.2(5c)-") ? "yes" : null
  service_bd_routing_disable = provider::aci::compare_versions(data.aci_system.version.version,"inside","6.0(4c)-") ? "no" : null
  virtual_mac_address = "not-applicable"
}
`
const testConfigFvBDChildrenDependencyWithFvTenant = testChildDependencyConfigFvBD + testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  annotations = [
    {
      key = "key_0"
      value = "value_1"
    },
    {
      key = "key_1"
      value = "test_value"
    },
  ]
  legacy_mode = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    description = "description_1"
    encapsulation = "vlan-100"
    name = "name_1"
    name_alias = "name_alias_1"
    owner_key = "owner_key_1"
    owner_tag = "owner_tag_1"
  }
  relation_to_dhcp_relay_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    dhcp_relay_policy_name = aci_dhcp_relay_policy.test_dhcp_relay_policy_0.name
  }
  relation_to_end_point_retention_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    end_point_retention_policy_name = aci_end_point_retention_policy.test_end_point_retention_policy_1.name
    resolve_action = "inherit"
  }
  relation_to_first_hop_security_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    first_hop_security_policy_name = aci_first_hop_security_policy.test_first_hop_security_policy_1.name
  }
  relation_to_igmp_snooping_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    igmp_snooping_policy_name = aci_igmp_snooping_policy.test_igmp_snooping_policy_0.name
  }
  relation_to_l3_outsides = [
    {
      annotation = "annotation_1"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      l3_outside_name = aci_l3_outside.test_l3_outside_0.name
    },
    {
      annotation = "annotation_2"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      l3_outside_name = aci_l3_outside.test_l3_outside_1.name
    },
  ]
  relation_to_mld_snooping_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    mld_snooping_policy_name = aci_mld_snooping_policy.test_mld_snooping_policy_1.name
  }
  relation_to_monitoring_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    monitoring_policy_name = aci_monitoring_policy.test_monitoring_policy_0.name
  }
  relation_to_neighbor_discovery_interface_policy = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    neighbor_discovery_interface_policy_name = aci_neighbor_discovery_interface_policy.test_neighbor_discovery_interface_policy_0.name
  }
  relation_to_netflow_monitor_policies = [
    {
      annotation = "annotation_1"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      filter_type = "ce"
      netflow_monitor_policy_name = "netflow_monitor_policy_name_0"
    },
    {
      annotation = "annotation_2"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      filter_type = "ipv4"
      netflow_monitor_policy_name = aci_netflow_monitor_policy.test_netflow_monitor_policy_1.name
    },
  ]
  relation_to_route_control_profile = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    l3_outside_name = aci_l3_outside.test_l3_outside_1.name
    route_control_profile_name = aci_route_control_profile.test_route_control_profile_1.name
  }
  relation_to_vrf = {
    annotation = "annotation_1"
    annotations = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [
	  {
        key = "key_0"
        value = "value_1"
	  },
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    vrf_name = aci_vrf.test_vrf_0.name
  }
  rogue_coop_exceptions = [
    {
      annotation = "annotation_1"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      description = "description_1"
      mac = "00:00:00:00:00:03"
      name = "name_1"
      name_alias = "name_alias_1"
    },
    {
      annotation = "annotation_2"
      annotations = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [
	    {
          key = "key_0"
          value = "value_1"
	    },
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      description = "description_2"
      mac = "00:00:00:00:00:01"
      name = "name_2"
      name_alias = "name_alias_2"
    },
  ]
  tags = [
    {
      key = "key_0"
      value = "value_1"
    },
    {
      key = "key_1"
      value = "test_value"
    },
  ]
}
`

const testConfigFvBDChildrenRemoveFromConfigDependencyWithFvTenant = testChildDependencyConfigFvBD + testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
}
`

const testConfigFvBDChildrenRemoveOneDependencyWithFvTenant = testChildDependencyConfigFvBD + testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  annotations = [ 
	{
	  key = "key_1"
	  value = "test_value"
	},
  ]
  legacy_mode = {}
  relation_to_dhcp_relay_policy = {}
  relation_to_end_point_retention_policy = {
    annotation = "annotation_1"
    annotations = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    end_point_retention_policy_name = aci_end_point_retention_policy.test_end_point_retention_policy_1.name
    resolve_action = "inherit"
  }
  relation_to_first_hop_security_policy = {}
  relation_to_igmp_snooping_policy = {
    annotation = "annotation_1"
    annotations = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    igmp_snooping_policy_name = aci_igmp_snooping_policy.test_igmp_snooping_policy_0.name
  }
  relation_to_l3_outsides = [ 
	{
	  annotation = "annotation_2"
      annotations = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
	  l3_outside_name = aci_l3_outside.test_l3_outside_1.name
	},
  ]
  relation_to_mld_snooping_policy = {
    annotation = "annotation_1"
    annotations = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    mld_snooping_policy_name = aci_mld_snooping_policy.test_mld_snooping_policy_1.name
  }
  relation_to_monitoring_policy = {}
  relation_to_neighbor_discovery_interface_policy = {
    annotation = "annotation_1"
    annotations = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    neighbor_discovery_interface_policy_name = aci_neighbor_discovery_interface_policy.test_neighbor_discovery_interface_policy_0.name
  }
  relation_to_netflow_monitor_policies = [ 
	{
	  annotation = "annotation_2"
      annotations = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
	  filter_type = "ipv4"
	  netflow_monitor_policy_name = aci_netflow_monitor_policy.test_netflow_monitor_policy_1.name
	},
  ]
  relation_to_route_control_profile = {}
  relation_to_vrf = {
    annotation = "annotation_1"
    annotations = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    tags = [ 
	  {
        key = "key_1"
        value = "test_value"
	  },
    ]
    vrf_name = aci_vrf.test_vrf_0.name
  }
  rogue_coop_exceptions = [ 
	{
	  annotation = "annotation_2"
      annotations = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
      tags = [ 
	    {
          key = "key_1"
          value = "test_value"
	    },
      ]
	  description = "description_2"
	  mac = "00:00:00:00:00:01"
	  name = "name_2"
	  name_alias = "name_alias_2"
	},
  ]
  tags = [ 
	{
	  key = "key_1"
	  value = "test_value"
	},
  ]
}
`

const testConfigFvBDChildrenRemoveAllDependencyWithFvTenant = testChildDependencyConfigFvBD + testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  parent_dn = aci_tenant.test.id
  name = "test_name"
  annotations = []
  legacy_mode = {}
  relation_to_dhcp_relay_policy = {}
  relation_to_end_point_retention_policy = {
    annotation = "annotation_1"
    annotations = []
    tags = []
    end_point_retention_policy_name = aci_end_point_retention_policy.test_end_point_retention_policy_1.name
    resolve_action = "inherit"
  }
  relation_to_first_hop_security_policy = {}
  relation_to_igmp_snooping_policy = {
    annotation = "annotation_1"
    annotations = []
    tags = []
    igmp_snooping_policy_name = aci_igmp_snooping_policy.test_igmp_snooping_policy_0.name
  }
  relation_to_l3_outsides = []
  relation_to_mld_snooping_policy = {
    annotation = "annotation_1"
    annotations = []
    tags = []
    mld_snooping_policy_name = aci_mld_snooping_policy.test_mld_snooping_policy_1.name
  }
  relation_to_monitoring_policy = {}
  relation_to_neighbor_discovery_interface_policy = {
    annotation = "annotation_1"
    annotations = []
    tags = []
    neighbor_discovery_interface_policy_name = aci_neighbor_discovery_interface_policy.test_neighbor_discovery_interface_policy_0.name
  }
  relation_to_netflow_monitor_policies = []
  relation_to_route_control_profile = {}
  relation_to_vrf = {
    annotation = "annotation_1"
    annotations = []
    tags = []
    vrf_name = aci_vrf.test_vrf_0.name
  }
  rogue_coop_exceptions = []
  tags = []
}
`

const testConfigFvBDLegacyAttributesWithFvTenant = testChildDependencyConfigFvBD + testConfigFvTenantMin + `
resource "aci_bridge_domain" "test" {
  name = "test_name"
  arp_flood = "no"
  ep_clear = "no"
  ep_move_detect_mode = "garp"
  host_based_routing = "no"
  intersite_bum_traffic_allow = "no"
  ipv6_mcast_allow = "no"
  ll_addr = "fe80::1"
  mac = "00:22:BD:F8:19:FE"
  mcast_allow = "no"
  multi_dst_pkt_act = "bd-flood"
  relation_fv_rs_abd_pol_mon_pol = aci_monitoring_policy.test_monitoring_policy_0.id
  relation_fv_rs_bd_to_ep_ret = aci_end_point_retention_policy.test_end_point_retention_policy_1.id
  relation_fv_rs_bd_to_fhs = aci_first_hop_security_policy.test_first_hop_security_policy_1.id
  relation_fv_rs_bd_to_nd_p = aci_neighbor_discovery_interface_policy.test_neighbor_discovery_interface_policy_0.id
  relation_fv_rs_bd_to_out = [aci_l3_outside.test_l3_outside_1.id]
  relation_fv_rs_bd_to_relay_p = aci_dhcp_relay_policy.test_dhcp_relay_policy_0.id
  relation_fv_rs_ctx = aci_vrf.test_vrf_0.id
  relation_fv_rs_igmpsn = aci_igmp_snooping_policy.test_igmp_snooping_policy_0.id
  relation_fv_rs_mldsn = aci_mld_snooping_policy.test_mld_snooping_policy_1.id
  tenant_dn = aci_tenant.test.id
  unicast_route = "yes"
  unk_mac_ucast_act = "flood"
  unk_mcast_act = "flood"
  v6unk_mcast_act = "flood"
  vmac = "00:22:BD:F8:19:FB"
  relation_fv_rs_bd_to_netflow_monitor_pol {
    flt_type = "ce"
    tn_netflow_monitor_pol_name = aci_netflow_monitor_policy.test_netflow_monitor_policy_1.id
  }
}
`
