Skip to content

Commit a54b0db

Browse files
committed
Resolve issue CiscoDevNet#265
1 parent 46f9d3a commit a54b0db

File tree

32 files changed

+4243
-4116
lines changed

32 files changed

+4243
-4116
lines changed

docs/data-sources/system_remote_access_profile_parcel.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,21 @@ data "sdwan_system_remote_access_profile_parcel" "example" {
2929

3030
### Read-Only
3131

32-
- `aaa_derive_name_domain` (String)
33-
- `aaa_derive_name_domain_variable` (String) Variable name
34-
- `aaa_derive_name_identity` (String)
35-
- `aaa_derive_name_identity_variable` (String) Variable name
32+
- `aaa_derive_name_from_peer_domain` (String)
33+
- `aaa_derive_name_from_peer_domain_variable` (String) Variable name
34+
- `aaa_derive_name_from_peer_identity` (String)
35+
- `aaa_derive_name_from_peer_identity_variable` (String) Variable name
3636
- `aaa_enable_accounting` (Boolean) Enable Accounting
3737
- `aaa_enable_accounting_variable` (String) Variable name
3838
- `aaa_specify_name_policy_name` (String)
3939
- `aaa_specify_name_policy_name_variable` (String) Variable name
4040
- `aaa_specify_name_policy_password` (String)
4141
- `aaa_specify_name_policy_password_variable` (String) Variable name
4242
- `any_connect_eap_authentication_type` (String)
43-
- `any_connect_eap_profile_download_status` (String)
44-
- `any_connect_eap_profile_download_status_variable` (String) Variable name
45-
- `any_connect_eap_profile_file_name` (String)
46-
- `any_connect_eap_profile_file_name_variable` (String) Variable name
4743
- `connection_type_ssl` (Boolean) Enabled SSL VPN
4844
- `description` (String) The description of the profile parcel
49-
- `enable_crl_check` (Boolean)
50-
- `enable_crl_check_variable` (String) Variable name
45+
- `enable_certificate_list_check` (Boolean)
46+
- `enable_certificate_list_check_variable` (String) Variable name
5147
- `ikev2_anti_dos_threshold` (Number) Anti-DOS Threshold
5248
- `ikev2_anti_dos_threshold_variable` (String) Variable name
5349
- `ikev2_local_ike_identity_type` (String)

docs/resources/system_remote_access_profile_parcel.md

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,27 @@ This resource can manage a System Remote Access profile parcel.
1616

1717
```terraform
1818
resource "sdwan_system_remote_access_profile_parcel" "example" {
19-
name = "Example"
20-
description = "My Example"
21-
feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"
22-
connection_type_ssl = false
23-
any_connect_eap_authentication_type = "user"
24-
any_connect_eap_profile_download_status = "INITIALIZED"
25-
any_connect_eap_profile_file_name = "<form-data>"
26-
ipv4_pool_size = 50
27-
ipv6_pool_size = 1024
28-
enable_crl_check = false
29-
psk_authentication_type = "aaa"
30-
psk_authentication_pre_shared_key = "Cisco123"
31-
radius_group_name = "radius-1"
32-
aaa_derive_name_identity = "MyPassword"
33-
aaa_enable_accounting = false
34-
ikev2_local_ike_identity_type = "EMAIL"
35-
ikev2_local_ike_identity_value = "[email protected]"
36-
ikev2_security_association_lifetime = 86400
37-
ikev2_anti_dos_threshold = 99
38-
ipsec_enable_anti_replay = false
39-
ipsec_anti_replay_window_size = 64
40-
ipsec_security_association_lifetime = 3600
41-
ipsec_enable_perfect_foward_secrecy = false
19+
name = "Example"
20+
description = "My Example"
21+
feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"
22+
connection_type_ssl = false
23+
any_connect_eap_authentication_type = "user"
24+
ipv4_pool_size = 50
25+
ipv6_pool_size = 1024
26+
enable_certificate_list_check = false
27+
psk_authentication_type = "aaa"
28+
psk_authentication_pre_shared_key = "Cisco123"
29+
radius_group_name = "radius-1"
30+
aaa_derive_name_from_peer_identity = "MyPassword"
31+
aaa_enable_accounting = false
32+
ikev2_local_ike_identity_type = "EMAIL"
33+
ikev2_local_ike_identity_value = "[email protected]"
34+
ikev2_security_association_lifetime = 86400
35+
ikev2_anti_dos_threshold = 99
36+
ipsec_enable_anti_replay = false
37+
ipsec_anti_replay_window_size = 64
38+
ipsec_security_association_lifetime = 3600
39+
ipsec_enable_perfect_foward_secrecy = false
4240
}
4341
```
4442

@@ -53,27 +51,22 @@ resource "sdwan_system_remote_access_profile_parcel" "example" {
5351

5452
### Optional
5553

56-
- `aaa_derive_name_domain` (String)
57-
- `aaa_derive_name_domain_variable` (String) Variable name
58-
- `aaa_derive_name_identity` (String)
59-
- `aaa_derive_name_identity_variable` (String) Variable name
54+
- `aaa_derive_name_from_peer_domain` (String)
55+
- `aaa_derive_name_from_peer_domain_variable` (String) Variable name
56+
- `aaa_derive_name_from_peer_identity` (String)
57+
- `aaa_derive_name_from_peer_identity_variable` (String) Variable name
6058
- `aaa_enable_accounting` (Boolean) Enable Accounting
6159
- Default value: `true`
6260
- `aaa_enable_accounting_variable` (String) Variable name
6361
- `aaa_specify_name_policy_name` (String)
6462
- `aaa_specify_name_policy_name_variable` (String) Variable name
6563
- `aaa_specify_name_policy_password` (String)
6664
- `aaa_specify_name_policy_password_variable` (String) Variable name
67-
- `any_connect_eap_profile_download_status` (String) - Choices: `NONE`, `INITIALIZED`, `INITIALIZED_ERROR`, `COMPLETE`, `COMPLETE_ERROR`
68-
- Default value: `NONE`
69-
- `any_connect_eap_profile_download_status_variable` (String) Variable name
70-
- `any_connect_eap_profile_file_name` (String)
71-
- `any_connect_eap_profile_file_name_variable` (String) Variable name
7265
- `connection_type_ssl` (Boolean) Enabled SSL VPN
7366
- Default value: `false`
7467
- `description` (String) The description of the profile parcel
75-
- `enable_crl_check` (Boolean) - Default value: `false`
76-
- `enable_crl_check_variable` (String) Variable name
68+
- `enable_certificate_list_check` (Boolean) - Default value: `false`
69+
- `enable_certificate_list_check_variable` (String) Variable name
7770
- `feature_profile_id` (String) Feature Profile ID
7871
- `ikev2_anti_dos_threshold` (Number) Anti-DOS Threshold
7972
- Range: `10`-`1000`
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
resource "sdwan_system_remote_access_profile_parcel" "example" {
2-
name = "Example"
3-
description = "My Example"
4-
feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"
5-
connection_type_ssl = false
6-
any_connect_eap_authentication_type = "user"
7-
any_connect_eap_profile_download_status = "INITIALIZED"
8-
any_connect_eap_profile_file_name = "<form-data>"
9-
ipv4_pool_size = 50
10-
ipv6_pool_size = 1024
11-
enable_crl_check = false
12-
psk_authentication_type = "aaa"
13-
psk_authentication_pre_shared_key = "Cisco123"
14-
radius_group_name = "radius-1"
15-
aaa_derive_name_identity = "MyPassword"
16-
aaa_enable_accounting = false
17-
ikev2_local_ike_identity_type = "EMAIL"
18-
ikev2_local_ike_identity_value = "[email protected]"
19-
ikev2_security_association_lifetime = 86400
20-
ikev2_anti_dos_threshold = 99
21-
ipsec_enable_anti_replay = false
22-
ipsec_anti_replay_window_size = 64
23-
ipsec_security_association_lifetime = 3600
24-
ipsec_enable_perfect_foward_secrecy = false
2+
name = "Example"
3+
description = "My Example"
4+
feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"
5+
connection_type_ssl = false
6+
any_connect_eap_authentication_type = "user"
7+
ipv4_pool_size = 50
8+
ipv6_pool_size = 1024
9+
enable_certificate_list_check = false
10+
psk_authentication_type = "aaa"
11+
psk_authentication_pre_shared_key = "Cisco123"
12+
radius_group_name = "radius-1"
13+
aaa_derive_name_from_peer_identity = "MyPassword"
14+
aaa_enable_accounting = false
15+
ikev2_local_ike_identity_type = "EMAIL"
16+
ikev2_local_ike_identity_value = "[email protected]"
17+
ikev2_security_association_lifetime = 86400
18+
ikev2_anti_dos_threshold = 99
19+
ipsec_enable_anti_replay = false
20+
ipsec_anti_replay_window_size = 64
21+
ipsec_security_association_lifetime = 3600
22+
ipsec_enable_perfect_foward_secrecy = false
2523
}

gen/definitions/profile_parcels/system_remote_access.yaml

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,38 @@ attributes:
1515
example: false
1616
- model_name: anyConnectEapAuth
1717
tf_name: any_connect_eap_authentication_type
18-
example: user
19-
- model_name: anyConnectProfileDownloadStatus
20-
tf_name: any_connect_eap_profile_download_status
21-
conditional_attribute:
22-
name: any_connect_eap_authentication_type
23-
value: device
24-
example: INITIALIZED
25-
- model_name: anyConnectProfileFileName
26-
tf_name: any_connect_eap_profile_file_name
2718
conditional_attribute:
28-
name: any_connect_eap_authentication_type
29-
value: device
30-
example: "<form-data>"
19+
name: connection_type_ssl
20+
value: false
21+
type: Bool
22+
example: user
23+
# ==== Requires support for file upload ===
24+
# - model_name: anyConnectProfileDownloadStatus
25+
# tf_name: any_connect_eap_profile_download_status
26+
# example: INITIALIZED
27+
# conditional_attribute:
28+
# name: any_connect_eap_authentication_type
29+
# value: device
30+
# - model_name: anyConnectProfileFileName
31+
# tf_name: any_connect_eap_profile_file_name
32+
# example: "<form-data>"
33+
# conditional_attribute:
34+
# name: any_connect_eap_authentication_type
35+
# value: device
3136
- model_name: ipv4PoolSize
3237
example: 50
3338
- model_name: ipv6PoolSize
3439
example: 1024
3540
- model_name: enableCrlCheck
41+
tf_name: enable_certificate_list_check
3642
example: false
3743
- model_name: pskSelection
3844
tf_name: psk_authentication_type
3945
data_path: [pskAuth]
46+
conditional_attribute:
47+
name: connection_type_ssl
48+
value: false
49+
type: Bool
4050
example: aaa
4151
- model_name: preSharedKey
4252
tf_name: psk_authentication_pre_shared_key
@@ -59,44 +69,84 @@ attributes:
5969
exclude_test: true
6070
example: cisco123
6171
- model_name: deriveNameIdentity
62-
tf_name: aaa_derive_name_identity
72+
tf_name: aaa_derive_name_from_peer_identity
6373
data_path: [aaaPolicy]
74+
conditional_attribute:
75+
name: connection_type_ssl
76+
value: false
77+
type: Bool
6478
example: MyPassword
6579
- model_name: deriveNameDomain
66-
tf_name: aaa_derive_name_domain
80+
tf_name: aaa_derive_name_from_peer_domain
6781
data_path: [aaaPolicy]
82+
conditional_attribute:
83+
name: connection_type_ssl
84+
value: false
85+
type: Bool
6886
exclude_test: true
6987
example: MyPassword
7088
- model_name: enableAccounting
7189
tf_name: aaa_enable_accounting
7290
example: false
7391
- model_name: localIkev2IdentityType
7492
tf_name: ikev2_local_ike_identity_type
93+
conditional_attribute:
94+
name: connection_type_ssl
95+
value: false
96+
type: Bool
7597
example: EMAIL
7698
- model_name: localIkev2IdentityValue
7799
tf_name: ikev2_local_ike_identity_value
100+
conditional_attribute:
101+
name: connection_type_ssl
102+
value: false
103+
type: Bool
78104
79105
- model_name: ikev2SaLifetime
80106
tf_name: ikev2_security_association_lifetime
107+
conditional_attribute:
108+
name: connection_type_ssl
109+
value: false
110+
type: Bool
81111
example: 86400
82112
- model_name: antiDosThreshold
83113
tf_name: ikev2_anti_dos_threshold
114+
conditional_attribute:
115+
name: connection_type_ssl
116+
value: false
117+
type: Bool
84118
example: 99
85119
- model_name: enableAntiReplay
86120
tf_name: ipsec_enable_anti_replay
121+
conditional_attribute:
122+
name: connection_type_ssl
123+
value: false
124+
type: Bool
87125
example: false
88126
- model_name: antiReplayWindowSize
89127
tf_name: ipsec_anti_replay_window_size
128+
conditional_attribute:
129+
name: connection_type_ssl
130+
value: false
131+
type: Bool
90132
example: 64
91133
- model_name: ipSecSaLifetime
92134
tf_name: ipsec_security_association_lifetime
135+
conditional_attribute:
136+
name: connection_type_ssl
137+
value: false
138+
type: Bool
93139
example: 3600
94140
- model_name: enablePFS
95141
tf_name: ipsec_enable_perfect_foward_secrecy
142+
conditional_attribute:
143+
name: connection_type_ssl
144+
value: false
145+
type: Bool
96146
example: false
97147

98148
test_prerequisites: |
99149
resource "sdwan_system_feature_profile" "test" {
100150
name = "TF_TEST"
101151
description = "Terraform test"
102-
}
152+
}

gen/generator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ type YamlConfigAttribute struct {
269269
type YamlConfigConditionalAttribute struct {
270270
Name string `yaml:"name"`
271271
Value string `yaml:"value"`
272+
Type string `yaml:"type"`
272273
}
273274

274275
// Templating helper function to convert TF name to GO name

gen/schema/schema.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ attribute:
8181
conditional_attribute:
8282
name: str() # Reference to other attribute
8383
value: str() # Attribute value
84+
types: str()

0 commit comments

Comments
 (0)