Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ND Interface Policy under L3Out Interface Profile #496 #181

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions aci_tenants.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ locals {
eigrp_keychain_policy = try(ip.eigrp.keychain_policy, "")
pim_policy = try("${ip.pim_policy}${local.defaults.apic.tenants.policies.pim_policies.name_suffix}", "")
igmp_interface_policy = try("${ip.igmp_interface_policy}${local.defaults.apic.tenants.policies.igmp_interface_policies.name_suffix}", "")
nd_interface_policy = try("${ip.nd_interface_policy}${local.defaults.apic.tenants.policies.nd_interface_policies.name_suffix}", "")
qos_class = try(ip.qos_class, local.defaults.apic.tenants.l3outs.node_profiles.interface_profiles.qos_class)
custom_qos_policy = try("${ip.custom_qos_policy}${local.defaults.apic.tenants.policies.custom_qos.name_suffix}", "")
dhcp_labels = [for label in try(ip.dhcp_labels, []) : {
Expand Down Expand Up @@ -1233,6 +1234,7 @@ module "aci_l3out_interface_profile_manual" {
eigrp_keychain_policy = each.value.eigrp_keychain_policy
pim_policy = each.value.pim_policy
igmp_interface_policy = each.value.igmp_interface_policy
nd_interface_policy = each.value.nd_interface_policy
qos_class = each.value.qos_class
custom_qos_policy = each.value.custom_qos_policy
dhcp_labels = each.value.dhcp_labels
Expand Down Expand Up @@ -1292,6 +1294,7 @@ locals {
eigrp_interface_policy = try(l3out.eigrp.interface_policy, "")
pim_policy = try("${l3out.pim_policy}${local.defaults.apic.tenants.policies.pim_policies.name_suffix}", "")
igmp_interface_policy = try("${l3out.igmp_interface_policy}${local.defaults.apic.tenants.policies.igmp_interface_policies.name_suffix}", "")
nd_interface_policy = try("${l3out.nd_interface_policy}${local.defaults.apic.tenants.policies.nd_interface_policies.name_suffix}", "")
qos_class = try(l3out.qos_class, local.defaults.apic.tenants.l3outs.node_profiles.interface_profiles.qos_class)
custom_qos_policy = try("${l3out.custom_qos_policy}${local.defaults.apic.tenants.policies.custom_qos.name_suffix}", "")
dhcp_labels = [for label in try(l3out.dhcp_labels, []) : {
Expand Down Expand Up @@ -1387,6 +1390,7 @@ module "aci_l3out_interface_profile_auto" {
eigrp_interface_policy = each.value.eigrp_interface_policy
pim_policy = each.value.pim_policy
igmp_interface_policy = each.value.igmp_interface_policy
nd_interface_policy = each.value.nd_interface_policy
qos_class = each.value.qos_class
custom_qos_policy = each.value.custom_qos_policy
dhcp_labels = each.value.dhcp_labels
Expand Down
3 changes: 3 additions & 0 deletions modules/terraform-aci-l3out-interface-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module "aci_l3out_interface_profile" {
ospf_authentication_type = "md5"
ospf_interface_policy = "OSPF1"
igmp_interface_policy = "IIP"
nd_interface_policy = "NDIP-SUPPRESS_RA"
qos_class = "level2"
custom_qos_policy = "CQP"
dhcp_labels = [
Expand Down Expand Up @@ -116,6 +117,7 @@ module "aci_l3out_interface_profile" {
| <a name="input_eigrp_interface_policy"></a> [eigrp\_interface\_policy](#input\_eigrp\_interface\_policy) | EIGRP interface policy name. | `string` | `""` | no |
| <a name="input_pim_policy"></a> [pim\_policy](#input\_pim\_policy) | PIM policy name. | `string` | `""` | no |
| <a name="input_igmp_interface_policy"></a> [igmp\_interface\_policy](#input\_igmp\_interface\_policy) | IGMP interface policy name. | `string` | `""` | no |
| <a name="input_nd_interface_policy"></a> [nd\_interface\_policy](#input\_nd\_interface\_policy) | ND interface policy. | `string` | `""` | no |
| <a name="input_qos_class"></a> [qos\_class](#input\_qos\_class) | QoS class. Choices: `level1`, `level2`, `level3`, `level4`, `level5`, `level6`, `unspecified`. | `string` | `"unspecified"` | no |
| <a name="input_custom_qos_policy"></a> [custom\_qos\_policy](#input\_custom\_qos\_policy) | Custom QoS policy name. | `string` | `""` | no |
| <a name="input_interfaces"></a> [interfaces](#input\_interfaces) | List of interfaces. Default value `svi`: false. Default value `floating_svi`: false. Choices `type`. `access`, `pc`, `vpc`. Default value `type`: `access`. Allowed values `vlan`: 1-4096. Format `mac`: `12:34:56:78:9A:BC`. `mtu`: Allowed values are `inherit` or a number between 576 and 9216. Allowed values `node_id`, `node2_id`: 1-4000. Allowed values `pod_id`: 1-255. Default value `pod_id`: 1. Allowed values `module`: 1-9. Default value `module`: 1. Allowed values `port`: 1-127. Default value `bgp_peers.bfd`: false. Allowed values `bgp_peers.ttl`: 1-255. Default value `bgp_peers.ttl`: 1. Allowed values `bgp_peers.weight`: 0-65535. Default value `bgp_peers.weight`: 0. Allowed values `bgp_peers.remote_as`: 0-4294967295. | <pre>list(object({<br> description = optional(string, "")<br> type = optional(string, "access")<br> node_id = number<br> node2_id = optional(number)<br> pod_id = optional(number, 1)<br> module = optional(number, 1)<br> port = optional(number)<br> sub_port = optional(number)<br> channel = optional(string)<br> ip = optional(string)<br> svi = optional(bool, false)<br> autostate = optional(bool, false)<br> floating_svi = optional(bool, false)<br> vlan = optional(number)<br> mac = optional(string, "00:22:BD:F8:19:FF")<br> mtu = optional(string, "inherit")<br> mode = optional(string, "regular")<br> ip_a = optional(string)<br> ip_b = optional(string)<br> ip_shared = optional(string)<br> scope = optional(string, "local")<br> multipod_direct = optional(bool, false)<br> bgp_peers = optional(list(object({<br> ip = string<br> remote_as = string<br> description = optional(string, "")<br> allow_self_as = optional(bool, false)<br> as_override = optional(bool, false)<br> disable_peer_as_check = optional(bool, false)<br> next_hop_self = optional(bool, false)<br> send_community = optional(bool, false)<br> send_ext_community = optional(bool, false)<br> password = optional(string)<br> allowed_self_as_count = optional(number, 3)<br> bfd = optional(bool, false)<br> disable_connected_check = optional(bool, false)<br> ttl = optional(number, 1)<br> weight = optional(number, 0)<br> remove_all_private_as = optional(bool, false)<br> remove_private_as = optional(bool, false)<br> replace_private_as_with_local_as = optional(bool, false)<br> unicast_address_family = optional(bool, true)<br> multicast_address_family = optional(bool, true)<br> admin_state = optional(bool, true)<br> local_as = optional(number)<br> as_propagate = optional(string, "none")<br> peer_prefix_policy = optional(string)<br> export_route_control = optional(string)<br> import_route_control = optional(string)<br> })), [])<br> paths = optional(list(object({<br> physical_domain = optional(string)<br> vmware_vmm_domain = optional(string)<br> elag = optional(string)<br> floating_ip = string<br> })), [])<br> micro_bfd_destination_ip = optional(string, "")<br> micro_bfd_start_timer = optional(number, 0)<br> }))</pre> | `[]` | no |
Expand Down Expand Up @@ -167,6 +169,7 @@ module "aci_l3out_interface_profile" {
| [aci_rest_managed.l3extMember_B](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extRsDynPathAtt](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extRsLIfPCustQosPol](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extRsNdIfPol](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extRsPathL3OutAtt](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extRsVSwitchEnhancedLagPol](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extVirtualLIfP](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module "aci_l3out_interface_profile" {
ospf_authentication_type = "md5"
ospf_interface_policy = "OSPF1"
igmp_interface_policy = "IIP"
nd_interface_policy = "NDIP-SUPPRESS_RA"
qos_class = "level2"
custom_qos_policy = "CQP"
dhcp_labels = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module "aci_l3out_interface_profile" {
ospf_authentication_type = "md5"
ospf_interface_policy = "OSPF1"
igmp_interface_policy = "IIP"
nd_interface_policy = "NDIP-SUPPRESS_RA"
qos_class = "level2"
custom_qos_policy = "CQP"
dhcp_labels = [
Expand Down
9 changes: 9 additions & 0 deletions modules/terraform-aci-l3out-interface-profile/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@ resource "aci_rest_managed" "igmpRsIfPol" {
}
}

resource "aci_rest_managed" "l3extRsNdIfPol" {
count = var.nd_interface_policy != "" ? 1 : 0
dn = "${aci_rest_managed.l3extLIfP.dn}/rsNdIfPol"
class_name = "l3extRsNdIfPol"
content = {
tnNdIfPolName = var.nd_interface_policy
}
}

resource "aci_rest_managed" "l3extRsLIfPCustQosPol" {
count = var.custom_qos_policy != "" ? 1 : 0
dn = "${aci_rest_managed.l3extLIfP.dn}/rslIfPCustQosPol"
Expand Down
6 changes: 6 additions & 0 deletions modules/terraform-aci-l3out-interface-profile/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ variable "igmp_interface_policy" {
}
}

variable "nd_interface_policy" {
description = "ND interface policy."
type = string
default = ""
}

variable "qos_class" {
description = "QoS class. Choices: `level1`, `level2`, `level3`, `level4`, `level5`, `level6`, `unspecified`."
type = string
Expand Down
Loading