Skip to content

Commit e532067

Browse files
committed
Refactor advanced attributes of authorization profile resource
1 parent a54f486 commit e532067

File tree

13 files changed

+173
-134
lines changed

13 files changed

+173
-134
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.7 (unreleased)
2+
3+
- BREAKING CHANGE: Refactor `advanced_attributes` of `ise_authorization_profile` resource and data source
4+
15
## 0.1.6
26

37
- Add `ise_downloadable_acl` resource and data source

docs/data-sources/authorization_profile.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ data "ise_authorization_profile" "example" {
6666

6767
Read-Only:
6868

69-
- `attribute_1_dictionary_name` (String) Dictionary name
70-
- `attribute_1_name` (String) Attribute name
71-
- `attribute_1_value_type` (String) Advanced attribute value type
72-
- `attribute_2_value` (String) Attribute value
73-
- `attribute_2_value_type` (String) Advanced attribute value type
69+
- `attribute_left_dictionary_name` (String) Dictionary name
70+
- `attribute_left_name` (String) Attribute name
71+
- `attribute_right_dictionary_name` (String) Dictionary name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
72+
- `attribute_right_name` (String) Attribute name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
73+
- `attribute_right_value` (String) Attribute value, only required when `attribute_right_value_type` is `AttributeValue`
74+
- `attribute_right_value_type` (String) Advanced attribute value type

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.1.7 (unreleased)
11+
12+
- BREAKING CHANGE: Refactor `advanced_attributes` of `ise_authorization_profile` resource and data source
13+
1014
## 0.1.6
1115

1216
- Add `ise_downloadable_acl` resource and data source

docs/resources/authorization_profile.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ resource "ise_authorization_profile" "example" {
4545
reauthentication_timer = 1
4646
advanced_attributes = [
4747
{
48-
attribute_1_value_type = "AdvancedDictionaryAttribute"
49-
attribute_1_dictionary_name = "Cisco"
50-
attribute_1_name = "cisco-av-pair"
51-
attribute_2_value_type = "AttributeValue"
52-
attribute_2_value = "set_nadprofile_vlan=true,vlan=TEST,tag=1"
48+
attribute_left_dictionary_name = "Cisco"
49+
attribute_left_name = "cisco-av-pair"
50+
attribute_right_value_type = "AttributeValue"
51+
attribute_right_value = "set_nadprofile_vlan=true,vlan=TEST,tag=1"
5352
}
5453
]
5554
airespace_ipv6_acl = "ACL1"
@@ -119,14 +118,14 @@ resource "ise_authorization_profile" "example" {
119118
<a id="nestedatt--advanced_attributes"></a>
120119
### Nested Schema for `advanced_attributes`
121120

122-
Required:
121+
Optional:
123122

124-
- `attribute_1_dictionary_name` (String) Dictionary name
125-
- `attribute_1_name` (String) Attribute name
126-
- `attribute_1_value_type` (String) Advanced attribute value type
127-
- Choices: `AdvancedDictionaryAttribute`, `AttributeValue`
128-
- `attribute_2_value` (String) Attribute value
129-
- `attribute_2_value_type` (String) Advanced attribute value type
123+
- `attribute_left_dictionary_name` (String) Dictionary name
124+
- `attribute_left_name` (String) Attribute name
125+
- `attribute_right_dictionary_name` (String) Dictionary name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
126+
- `attribute_right_name` (String) Attribute name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
127+
- `attribute_right_value` (String) Attribute value, only required when `attribute_right_value_type` is `AttributeValue`
128+
- `attribute_right_value_type` (String) Advanced attribute value type
130129
- Choices: `AdvancedDictionaryAttribute`, `AttributeValue`
131130

132131
## Import

examples/resources/ise_authorization_profile/resource.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ resource "ise_authorization_profile" "example" {
3030
reauthentication_timer = 1
3131
advanced_attributes = [
3232
{
33-
attribute_1_value_type = "AdvancedDictionaryAttribute"
34-
attribute_1_dictionary_name = "Cisco"
35-
attribute_1_name = "cisco-av-pair"
36-
attribute_2_value_type = "AttributeValue"
37-
attribute_2_value = "set_nadprofile_vlan=true,vlan=TEST,tag=1"
33+
attribute_left_dictionary_name = "Cisco"
34+
attribute_left_name = "cisco-av-pair"
35+
attribute_right_value_type = "AttributeValue"
36+
attribute_right_value = "set_nadprofile_vlan=true,vlan=TEST,tag=1"
3837
}
3938
]
4039
airespace_ipv6_acl = "ACL1"

gen/definitions/authorization_profile.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ attributes:
3434
- model_name: WebRedirectionType
3535
data_path: [AuthorizationProfile, webRedirection]
3636
type: String
37-
enum_values: [CentralizedWebAuth, HotSpot, NativeSupplicanProvisioning, ClientProvisioning]
37+
enum_values:
38+
[
39+
CentralizedWebAuth,
40+
HotSpot,
41+
NativeSupplicanProvisioning,
42+
ClientProvisioning,
43+
]
3844
description: "This type must fit the `web_redirection_portal_name`"
3945
example: CentralizedWebAuth
4046
- model_name: acl
@@ -178,7 +184,7 @@ attributes:
178184
tf_name: reauthentication_connectivity
179185
type: String
180186
enum_values: [DEFAULT, RADIUS_REQUEST]
181-
description: Maintain Connectivity During Reauthentication
187+
description: Maintain Connectivity During Reauthentication
182188
example: DEFAULT
183189
- model_name: timer
184190
data_path: [AuthorizationProfile, reauth]
@@ -195,41 +201,47 @@ attributes:
195201
attributes:
196202
- model_name: AdvancedAttributeValueType
197203
data_path: [leftHandSideDictionaryAttribue]
198-
tf_name: attribute_1_value_type
199204
type: String
200-
enum_values: [AdvancedDictionaryAttribute, AttributeValue]
201-
description: Advanced attribute value type
202-
id: true
203-
example: AdvancedDictionaryAttribute
205+
value: AdvancedDictionaryAttribute
204206
- model_name: dictionaryName
205207
data_path: [leftHandSideDictionaryAttribue]
206-
tf_name: attribute_1_dictionary_name
208+
tf_name: attribute_left_dictionary_name
207209
type: String
208-
id: true
209210
description: Dictionary name
210211
example: Cisco
211212
- model_name: attributeName
212213
data_path: [leftHandSideDictionaryAttribue]
213-
tf_name: attribute_1_name
214+
tf_name: attribute_left_name
214215
type: String
215-
id: true
216216
description: Attribute name
217217
example: cisco-av-pair
218218
- model_name: AdvancedAttributeValueType
219-
tf_name: attribute_2_value_type
219+
tf_name: attribute_right_value_type
220220
data_path: [rightHandSideAttribueValue]
221221
type: String
222222
enum_values: [AdvancedDictionaryAttribute, AttributeValue]
223223
description: Advanced attribute value type
224-
id: true
225224
example: AttributeValue
226225
- model_name: value
227226
data_path: [rightHandSideAttribueValue]
228-
tf_name: attribute_2_value
227+
tf_name: attribute_right_value
229228
type: String
230-
id: true
231-
description: Attribute value
229+
description: Attribute value, only required when `attribute_right_value_type` is `AttributeValue`
232230
example: set_nadprofile_vlan=true,vlan=TEST,tag=1
231+
- model_name: dictionaryName
232+
data_path: [rightHandSideAttribueValue]
233+
tf_name: attribute_right_dictionary_name
234+
type: String
235+
description: Dictionary name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
236+
example: Cisco
237+
exclude_test: true
238+
- model_name: attributeName
239+
data_path: [rightHandSideAttribueValue]
240+
tf_name: attribute_right_name
241+
type: String
242+
description: Attribute name, only required when `attribute_right_value_type` is `AdvancedDictionaryAttribute`
243+
example: cisco-av-pair
244+
exclude_test: true
233245
- model_name: ipv6DaclName
234246
data_path: [AuthorizationProfile]
235247
type: String

gen/templates/model.go

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

internal/provider/data_source_ise_authorization_profile.go

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

internal/provider/data_source_ise_authorization_profile_test.go

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

0 commit comments

Comments
 (0)