Skip to content

Conversation

@therealdoug
Copy link
Contributor

@therealdoug therealdoug commented Aug 12, 2024

A aci-access-leaf-copp-policy module
A aci-access-spine-copp-policy module
A aci-copp-interface-policy module
M aci-access-leaf-interface-policy-group
M aci-access-leaf-switch-policy-group
M aci-access-spine-switch-policy-group
M .pre-commit-config.yaml
M aci_access_policies.tf
M defaults.yaml
M modules.yaml

Doug Byrd and others added 2 commits August 12, 2024 16:24
A `aci-access-spine-copp-policy` module
A `aci-copp-interface-policy` module
M aci-access-leaf-interface-policy-group
M aci-access-leaf-switch-policy-group
M aci-access-spine-switch-policy-group
M `.pre-commit-config.yaml`
M `aci_access_policies.tf`
M `defaults.yaml`
M `modules.yaml`
@juchowan juchowan requested a review from jgomezve August 29, 2024 15:30
@therealdoug
Copy link
Contributor Author

@juchowan Can we assign to another reviewer?

args: ["./modules/terraform-aci-coop-policy"]
- id: terraform-docs-system
args: ["./modules/terraform-aci-coop-policy/examples/complete"]
- id: terraform-docs-system
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is duplicated

dhcp_relay_policies:
name_suffix: ""
switch_policies:
copp_leaf:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaf_copp_policies

tor_glean_burst: default
traceroute_rate: default
traceroute_burst: default
copp_spine:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spine_copp_policies

module "aci_access_spine_copp_policy" {
source = "./modules/terraform-aci-access-spine-copp-policy"

for_each = { for pol in try(local.access_policies.spine_copp_policies, []) : pol.name => pol if local.modules.aci_access_spine_copp_policy && var.manage_access_policies }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is looping incorrectly, should be over local.access_policies.switch_policies.spine_copp_policies

module "aci_access_leaf_copp_policy" {
source = "./modules/terraform-aci-access-leaf-copp-policy"

for_each = { for pol in try(local.access_policies.leaf_copp_policies, []) : pol.name => pol if local.modules.aci_access_leaf_copp_policy && var.manage_access_policies }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is looping incorrectly, should be over local.access_policies.switch_policies.leaf_copp_policies

type = var.type
}

dynamic "child" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing it with dynamic block instead of another resource?

}
}

variable "custom_values" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each of them should be a separate variable with its own validation or a type object

}

resource "aci_rest_managed" "infraRsCoppIfPol" {
count = var.type != "breakout" ? 1 : 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this resource should be configured only if that policy is configured, to avoid creating empty resources

}

resource "aci_rest_managed" "infraRsLeafCoppProfile" {
dn = "${aci_rest_managed.infraAccNodePGrp.dn}/rsleafCoppProfile"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing condition that would create it only if policy is configured

}

resource "aci_rest_managed" "infraRsSpineCoppProfile" {
dn = "${aci_rest_managed.infraSpineAccNodePGrp.dn}/rsspineCoppProfile"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants