Closed grg1bbs closed 9 months ago
hey @grg1bbs attribute name should be command_sets not commands_sets
# module.ise.ise_device_admin_authorization_rule.device_admin_authorization_rule_0["Routers and Switches/Router Switch ReadOnly"] will be created
+ resource "ise_device_admin_authorization_rule" "device_admin_authorization_rule_0" {
+ children = [
+ {
+ children = [
+ {
+ attribute_name = "Device Type"
+ attribute_value = "All Device Types#Cisco Router"
+ condition_type = "ConditionAttributes"
+ dictionary_name = "DEVICE"
+ is_negate = false
+ operator = "equals"
},
+ {
+ attribute_name = "Device Type"
+ attribute_value = "All Device Types#Cisco Switch"
+ condition_type = "ConditionAttributes"
+ dictionary_name = "DEVICE"
+ is_negate = false
+ operator = "equals"
},
]
+ condition_type = "ConditionOrBlock"
+ is_negate = false
},
+ {
+ attribute_name = "ExternalGroups"
+ attribute_value = "trappedunderise.com/Users/Net Monitor"
+ condition_type = "ConditionAttributes"
+ dictionary_name = "ISELAB_AD"
+ is_negate = false
+ operator = "equals"
},
]
+ command_sets = [
+ "PermitShowCommands",
]
+ condition_is_negate = false
+ condition_type = "ConditionAndBlock"
+ default = false
+ id = (known after apply)
+ name = "Router Switch ReadOnly"
+ policy_set_id = (known after apply)
+ profile = "IOS_Admin_Priv10"
+ state = "enabled"
}
@kuba-mazurkiewicz : Of course! That was my silly mistake. I tested it with the corrected syntax and the apply worked as expected. The iac-validate doesn't catch this, so that should help in future when it's available.
Closing this issue. User error.
When creating a Device Admin Policy set with the nested authentication_rules and authorization_rules blocks, the command_sets attribute is not captured and read into the TF plan/apply operation. As such, the AuthZ Policy created in ISE is lacking the Command Sets value.
Example code block
Example TF plan output