Skip to content

Commit 3a73db7

Browse files
Add network access authentication rule update rank resource (#80)
1 parent c577837 commit 3a73db7

File tree

52 files changed

+1300
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1300
-709
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.3 (unreleased)
2+
3+
- Add resource `network_access_authentication_rule_update_rank` for updating rank under network access authentication rule to bypass API limitation which restricts rank assignments to a strictly incremental sequence
4+
15
## 0.2.2
26

37
- Fix issue with `ise_repository` triggers in-place upgrade when no changes are made #59

docs/guides/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ description: |-
77

88
# Changelog
99

10+
## 0.2.3 (unreleased)
11+
12+
- Add resource `network_access_authentication_rule_update_rank` for updating rank under network access authentication rule to bypass API limitation which restricts rank assignments to a strictly incremental sequence
13+
1014
## 0.2.2
1115

1216
- Fix issue with `ise_repository` triggers in-place upgrade when no changes are made #59
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "ise_network_access_authentication_rule_update_rank Resource - terraform-provider-ise"
4+
subcategory: "Network Access"
5+
description: |-
6+
This resource is used to update rank field in network access authentication rule. It serves as a workaround for the ISE API/Backend limitation which restricts rank assignments to a strictly incremental sequence. By utilizing this resource and network_access_authentication_rule resource, you can bypass the APIs limitation. Creation of this resource is performing PUT operation (Update) and it only tracks rank field. When this resource is destroyed, no action is performed on ISE and resource is just removed from state.
7+
---
8+
9+
# ise_network_access_authentication_rule_update_rank (Resource)
10+
11+
This resource is used to update rank field in network access authentication rule. It serves as a workaround for the ISE API/Backend limitation which restricts rank assignments to a strictly incremental sequence. By utilizing this resource and network_access_authentication_rule resource, you can bypass the APIs limitation. Creation of this resource is performing PUT operation (Update) and it only tracks rank field. When this resource is destroyed, no action is performed on ISE and resource is just removed from state.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "ise_network_access_authentication_rule_update_rank" "example" {
17+
auth_rule_id = "9b3680da-0165-44f6-9cff-88e778d98020"
18+
policy_set_id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9"
19+
rank = 0
20+
}
21+
```
22+
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
25+
26+
### Required
27+
28+
- `auth_rule_id` (String) Authentication rule ID
29+
- `policy_set_id` (String) Policy set ID
30+
- `rank` (Number) The rank (priority) in relation to other rules. Lower rank is higher priority.
31+
32+
### Read-Only
33+
34+
- `id` (String) The id of the object
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "ise_network_access_authentication_rule_update_rank" "example" {
2+
auth_rule_id = "9b3680da-0165-44f6-9cff-88e778d98020"
3+
policy_set_id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9"
4+
rank = 0
5+
}

gen/definitions/network_access_authentication_rule.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: Network Access Authentication Rule
3+
# Manual update in Update function in resource file to read rank from existing object and send that in PUT request
34
rest_endpoint: /api/v1/policy/network-access/policy-set/%v/authentication
45
data_source_name_query: true
56
id_path: response.rule.id
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: Network Access Authentication Rule Update Rank
3+
# Manual update in Create function in resource file to add AuthRuleId to path
4+
# and populate attributes from existing resource using GET request in Create and Update functions
5+
res_description:
6+
'This resource is used to update rank field in network access authentication rule. It serves as a workaround for the
7+
ISE API/Backend limitation which restricts rank assignments to a strictly incremental sequence.
8+
By utilizing this resource and network_access_authentication_rule resource, you can bypass the APIs limitation.
9+
Creation of this resource is performing PUT operation (Update) and it only tracks rank field.
10+
When this resource is destroyed, no action is performed on ISE and resource is just removed from state.'
11+
rest_endpoint: /api/v1/policy/network-access/policy-set/%v/authentication
12+
put_create: true
13+
no_delete: true
14+
no_import: true
15+
no_data_source: true
16+
skip_minimum_test: true
17+
doc_category: Network Access
18+
attributes:
19+
- tf_name: auth_rule_id
20+
type: String
21+
write_only: true
22+
mandatory: true
23+
id: true
24+
description: Authentication rule ID
25+
example: 9b3680da-0165-44f6-9cff-88e778d98020
26+
test_value: ise_network_access_authentication_rule.test.id
27+
- tf_name: policy_set_id
28+
type: String
29+
reference: true
30+
description: Policy set ID
31+
example: d82952cb-b901-4b09-b363-5ebf39bdbaf9
32+
test_value: ise_network_access_policy_set.test.id
33+
- model_name: rank
34+
mandatory: true
35+
data_path: [rule]
36+
type: Int64
37+
description: The rank (priority) in relation to other rules. Lower rank is higher priority.
38+
example: 0
39+
test_prerequisites: |
40+
resource "ise_network_access_policy_set" "test" {
41+
name = "PolicySet1"
42+
service_name = "Default Network Access"
43+
condition_type = "ConditionAttributes"
44+
condition_is_negate = false
45+
condition_attribute_name = "Location"
46+
condition_attribute_value = "All Locations"
47+
condition_dictionary_name = "DEVICE"
48+
condition_operator = "equals"
49+
}
50+
resource "ise_network_access_authentication_rule" "test" {
51+
policy_set_id = ise_network_access_policy_set.test.id
52+
name = "Rule1"
53+
default = false
54+
state = "enabled"
55+
condition_type = "ConditionAttributes"
56+
condition_is_negate = false
57+
condition_attribute_name = "Location"
58+
condition_attribute_value = "All Locations"
59+
condition_dictionary_name = "DEVICE"
60+
condition_operator = "equals"
61+
identity_source_name = "Internal Endpoints"
62+
if_auth_fail = "REJECT"
63+
if_process_fail = "DROP"
64+
if_user_not_found = "REJECT"
65+
}

gen/templates/model.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/model_ise_active_directory_add_groups.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/model_ise_active_directory_join_domain_with_all_nodes.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)