diff --git a/README.md b/README.md index 206ee61..8024399 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ module "iosxr" { |------|------| | [iosxr_as_path_set.as_path_set](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/as_path_set) | resource | | [iosxr_banner.banner](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/banner) | resource | +| [iosxr_bgp_as_format.bgp_as_format](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/bgp_as_format) | resource | | [iosxr_cdp.cdp](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/cdp) | resource | | [iosxr_class_map_qos.class_map_qos](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/class_map_qos) | resource | | [iosxr_community_set.community_set](https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/community_set) | resource | diff --git a/iosxr_bgp_as_format.tf b/iosxr_bgp_as_format.tf new file mode 100644 index 0000000..ef4dffe --- /dev/null +++ b/iosxr_bgp_as_format.tf @@ -0,0 +1,5 @@ +resource "iosxr_bgp_as_format" "bgp_as_format" { + for_each = { for device in local.devices : device.name => device if try(local.device_config[device.name].bgp_as_format, null) != null || try(local.defaults.iosxr.devices.configuration.bgp_as_format, null) != null } + device = each.value.name + as_format = try(local.device_config[each.value.name].bgp_as_format.as_format, local.defaults.iosxr.devices.configuration.bgp_as_format.as_format, null) +}