CiscoDevNet / terraform-provider-iosxr

Terraform Cisco IOS-XR Provider
https://registry.terraform.io/providers/CiscoDevNet/iosxr
Mozilla Public License 2.0
5 stars 9 forks source link

iosxr_policy_map #139

Closed rjoensen closed 1 year ago

rjoensen commented 1 year ago

Hello,

iosxr_policy_map is missing some features, and is unable to setup conform-action and exceeded-actions. Also can't seem to be able to setup police rate "percent".

Hopefully this comes in future releases.

Best wishes, rjoensen

danischm commented 1 year ago

Could you share the equivalent CLI commands you are looking for?

rjoensen commented 1 year ago

Hello,

Example is here;

policy-map INGRESS-POLICE-39-PERCENT class class-default police rate percent 39 conform-action transmit exceed-action drop ! ! end-policy-map

danischm commented 1 year ago

https://github.com/CiscoDevNet/terraform-provider-iosxr/commit/441f08f5810d23a34f984d061b38a082eb316b70

danischm commented 1 year ago

tested with the following config:

resource "iosxr_policy_map_qos" "example" {
  policy_map_name = "INGRESS-POLICE-39-PERCENT"
  classes = [
    {
      name                           = "class-default"
      type                           = "qos"
      police_rate_unit               = "percent"
      police_rate_value              = "39"
      police_conform_action_transmit = true
      police_exceed_action_drop      = true
    }
  ]
}
danischm commented 1 year ago

Available in v0.2.2