Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Aug 13, 2024
1 parent f99fe2d commit 0b3c4a1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 38 deletions.
28 changes: 15 additions & 13 deletions docs/resources/system_remote_access_profile_parcel.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ resource "sdwan_system_remote_access_profile_parcel" "example" {

### Required

- `any_connect_eap_authentication_type` (String) - Choices: `user`, `device`
- `any_connect_eap_authentication_type` (String) , Attribute conditional on `connection_type_ssl` being equal to `false`
- Choices: `user`, `device`
- `name` (String) The name of the profile parcel
- `radius_group_name` (String)

### Optional

- `aaa_derive_name_from_peer_domain` (String)
- `aaa_derive_name_from_peer_domain` (String) , Attribute conditional on `connection_type_ssl` being equal to `false`
- `aaa_derive_name_from_peer_domain_variable` (String) Variable name
- `aaa_derive_name_from_peer_identity` (String)
- `aaa_derive_name_from_peer_identity` (String) , Attribute conditional on `connection_type_ssl` being equal to `false`
- `aaa_derive_name_from_peer_identity_variable` (String) Variable name
- `aaa_enable_accounting` (Boolean) Enable Accounting
- Default value: `true`
Expand All @@ -68,28 +69,29 @@ resource "sdwan_system_remote_access_profile_parcel" "example" {
- `enable_certificate_list_check` (Boolean) - Default value: `false`
- `enable_certificate_list_check_variable` (String) Variable name
- `feature_profile_id` (String) Feature Profile ID
- `ikev2_anti_dos_threshold` (Number) Anti-DOS Threshold
- `ikev2_anti_dos_threshold` (Number) Anti-DOS Threshold, Attribute conditional on `connection_type_ssl` being equal to `false`
- Range: `10`-`1000`
- Default value: `100`
- `ikev2_anti_dos_threshold_variable` (String) Variable name
- `ikev2_local_ike_identity_type` (String) - Choices: `EMAIL`, `FQDN`, `KEYID`, `IPv4 ADDRESS`, `IPv6 ADDRESS`
- `ikev2_local_ike_identity_type` (String) , Attribute conditional on `connection_type_ssl` being equal to `false`
- Choices: `EMAIL`, `FQDN`, `KEYID`, `IPv4 ADDRESS`, `IPv6 ADDRESS`
- `ikev2_local_ike_identity_type_variable` (String) Variable name
- `ikev2_local_ike_identity_value` (String)
- `ikev2_local_ike_identity_value` (String) , Attribute conditional on `connection_type_ssl` being equal to `false`
- `ikev2_local_ike_identity_value_variable` (String) Variable name
- `ikev2_security_association_lifetime` (Number) Security Association Lifetime in Seconds
- `ikev2_security_association_lifetime` (Number) Security Association Lifetime in Seconds, Attribute conditional on `connection_type_ssl` being equal to `false`
- Range: `3600`-`86400`
- Default value: `86400`
- `ikev2_security_association_lifetime_variable` (String) Variable name
- `ipsec_anti_replay_window_size` (Number) security Association Lifetime
- `ipsec_anti_replay_window_size` (Number) security Association Lifetime, Attribute conditional on `ipsec_enable_anti_replay` being equal to `true`
- Default value: `64`
- `ipsec_anti_replay_window_size_variable` (String) Variable name
- `ipsec_enable_anti_replay` (Boolean) Enable Anti-Replay
- `ipsec_enable_anti_replay` (Boolean) Enable Anti-Replay, Attribute conditional on `connection_type_ssl` being equal to `false`
- Default value: `true`
- `ipsec_enable_anti_replay_variable` (String) Variable name
- `ipsec_enable_perfect_foward_secrecy` (Boolean) security Association Lifetime
- `ipsec_enable_perfect_foward_secrecy` (Boolean) security Association Lifetime, Attribute conditional on `connection_type_ssl` being equal to `false`
- Default value: `false`
- `ipsec_enable_perfect_foward_secrecy_variable` (String) Variable name
- `ipsec_security_association_lifetime` (Number) Security Association Lifetime in Seconds
- `ipsec_security_association_lifetime` (Number) Security Association Lifetime in Seconds, Attribute conditional on `connection_type_ssl` being equal to `false`
- Range: `3600`-`86400`
- Default value: `3600`
- `ipsec_security_association_lifetime_variable` (String) Variable name
Expand All @@ -99,9 +101,9 @@ resource "sdwan_system_remote_access_profile_parcel" "example" {
- `ipv6_pool_size` (Number) IPv6 Pool Size
- Default value: `1024`
- `ipv6_pool_size_variable` (String) Variable name
- `psk_authentication_pre_shared_key` (String) PSK Pre Shared Key
- `psk_authentication_pre_shared_key` (String) PSK Pre Shared Key, Attribute conditional on `psk_authentication_type` being equal to `group`
- `psk_authentication_pre_shared_key_variable` (String) Variable name
- `psk_authentication_type` (String) PSK Selection
- `psk_authentication_type` (String) PSK Selection, Attribute conditional on `connection_type_ssl` being equal to `false`
- Choices: `aaa`, `group`
- `psk_authentication_type_variable` (String) Variable name
- `radius_group_name_variable` (String) Variable name
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/transport_management_vpn_profile_parcel.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "sdwan_transport_management_vpn_profile_parcel" "example" {

Optional:

- `administrative_distance` (Number) Administrative distance
- `administrative_distance` (Number) Administrative distance, Attribute conditional on `gateway` being equal to `null0`
- Range: `1`-`255`
- Default value: `1`
- `administrative_distance_variable` (String) Variable name
Expand All @@ -102,7 +102,7 @@ Optional:
- Default value: `nextHop`
- `network_address` (String) IP Address
- `network_address_variable` (String) Variable name
- `next_hops` (Attributes List) IPv4 Route Gateway Next Hop (see [below for nested schema](#nestedatt--ipv4_static_routes--next_hops))
- `next_hops` (Attributes List) IPv4 Route Gateway Next Hop, Attribute conditional on `gateway` being equal to `nextHop` (see [below for nested schema](#nestedatt--ipv4_static_routes--next_hops))
- `subnet_mask` (String) Subnet Mask
- Choices: `255.255.255.255`, `255.255.255.254`, `255.255.255.252`, `255.255.255.248`, `255.255.255.240`, `255.255.255.224`, `255.255.255.192`, `255.255.255.128`, `255.255.255.0`, `255.255.254.0`, `255.255.252.0`, `255.255.248.0`, `255.255.240.0`, `255.255.224.0`, `255.255.192.0`, `255.255.128.0`, `255.255.0.0`, `255.254.0.0`, `255.252.0.0`, `255.240.0.0`, `255.224.0.0`, `255.192.0.0`, `255.128.0.0`, `255.0.0.0`, `254.0.0.0`, `252.0.0.0`, `248.0.0.0`, `240.0.0.0`, `224.0.0.0`, `192.0.0.0`, `128.0.0.0`, `0.0.0.0`
- `subnet_mask_variable` (String) Variable name
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/transport_wan_vpn_profile_parcel.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ resource "sdwan_transport_wan_vpn_profile_parcel" "example" {

Optional:

- `administrative_distance` (Number) Administrative distance
- `administrative_distance` (Number) Administrative distance, Attribute conditional on `gateway` being equal to `null0`
- Range: `1`-`255`
- Default value: `1`
- `administrative_distance_variable` (String) Variable name
Expand All @@ -121,7 +121,7 @@ Optional:
- Default value: `nextHop`
- `network_address` (String) IP Address
- `network_address_variable` (String) Variable name
- `next_hops` (Attributes List) IPv4 Route Gateway Next Hop (see [below for nested schema](#nestedatt--ipv4_static_routes--next_hops))
- `next_hops` (Attributes List) IPv4 Route Gateway Next Hop, Attribute conditional on `gateway` being equal to `nextHop` (see [below for nested schema](#nestedatt--ipv4_static_routes--next_hops))
- `subnet_mask` (String) Subnet Mask
- Choices: `255.255.255.255`, `255.255.255.254`, `255.255.255.252`, `255.255.255.248`, `255.255.255.240`, `255.255.255.224`, `255.255.255.192`, `255.255.255.128`, `255.255.255.0`, `255.255.254.0`, `255.255.252.0`, `255.255.248.0`, `255.255.240.0`, `255.255.224.0`, `255.255.192.0`, `255.255.128.0`, `255.255.0.0`, `255.254.0.0`, `255.252.0.0`, `255.240.0.0`, `255.224.0.0`, `255.192.0.0`, `255.128.0.0`, `255.0.0.0`, `254.0.0.0`, `252.0.0.0`, `248.0.0.0`, `240.0.0.0`, `224.0.0.0`, `192.0.0.0`, `128.0.0.0`, `0.0.0.0`
- `subnet_mask_variable` (String) Variable name
Expand Down
8 changes: 4 additions & 4 deletions gen/templates/profile_parcels/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (r *{{camelCase .Name}}ProfileParcelResource) Schema(ctx context.Context, r
{{- range .Attributes}}
{{- if not .Value}}
"{{.TfName}}": schema.{{if isNestedListSet .}}{{.Type}}Nested{{else if isList .}}List{{else if isSet .}}Set{{else}}{{.Type}}{{end}}Attribute{
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}")
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}{{if .ConditionalAttribute.Name}}, Attribute conditional on `{{.ConditionalAttribute.Name}}` being equal to `{{.ConditionalAttribute.Value}}`{{end}}")
{{- if and (len .EnumValues) (not .IgnoreEnum) -}}
.AddStringEnumDescription({{range .EnumValues}}"{{.}}", {{end}})
{{- end -}}
Expand Down Expand Up @@ -152,7 +152,7 @@ func (r *{{camelCase .Name}}ProfileParcelResource) Schema(ctx context.Context, r
{{- range .Attributes}}
{{- if not .Value}}
"{{.TfName}}": schema.{{if isNestedListSet .}}{{.Type}}Nested{{else if isList .}}List{{else if isSet .}}Set{{else}}{{.Type}}{{end}}Attribute{
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}")
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}{{if .ConditionalAttribute.Name}}, Attribute conditional on `{{.ConditionalAttribute.Name}}` being equal to `{{.ConditionalAttribute.Value}}`{{end}}")
{{- if and (len .EnumValues) (not .IgnoreEnum) -}}
.AddStringEnumDescription({{range .EnumValues}}"{{.}}", {{end}})
{{- end -}}
Expand Down Expand Up @@ -214,7 +214,7 @@ func (r *{{camelCase .Name}}ProfileParcelResource) Schema(ctx context.Context, r
{{- range .Attributes}}
{{- if not .Value}}
"{{.TfName}}": schema.{{if isNestedListSet .}}{{.Type}}Nested{{else if isList .}}List{{else if isSet .}}Set{{else}}{{.Type}}{{end}}Attribute{
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}")
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}{{if .ConditionalAttribute.Name}}, Attribute conditional on `{{.ConditionalAttribute.Name}}` being equal to `{{.ConditionalAttribute.Value}}`{{end}}")
{{- if and (len .EnumValues) (not .IgnoreEnum) -}}
.AddStringEnumDescription({{range .EnumValues}}"{{.}}", {{end}})
{{- end -}}
Expand Down Expand Up @@ -276,7 +276,7 @@ func (r *{{camelCase .Name}}ProfileParcelResource) Schema(ctx context.Context, r
{{- range .Attributes}}
{{- if not .Value}}
"{{.TfName}}": schema.{{if isList .}}List{{else if isSet .}}Set{{else}}{{.Type}}{{end}}Attribute{
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}")
MarkdownDescription: helpers.NewAttributeDescription("{{.Description}}{{if .ConditionalAttribute.Name}}, Attribute conditional on `{{.ConditionalAttribute.Name}}` being equal to `{{.ConditionalAttribute.Value}}`{{end}}")
{{- if and (len .EnumValues) (not .IgnoreEnum) -}}
.AddStringEnumDescription({{range .EnumValues}}"{{.}}", {{end}})
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"any_connect_eap_authentication_type": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("").AddStringEnumDescription("user", "device").String,
MarkdownDescription: helpers.NewAttributeDescription(", Attribute conditional on `connection_type_ssl` being equal to `false`").AddStringEnumDescription("user", "device").String,
Required: true,
Validators: []validator.String{
stringvalidator.OneOf("user", "device"),
Expand Down Expand Up @@ -124,7 +124,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"psk_authentication_type": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("PSK Selection").AddStringEnumDescription("aaa", "group").String,
MarkdownDescription: helpers.NewAttributeDescription("PSK Selection, Attribute conditional on `connection_type_ssl` being equal to `false`").AddStringEnumDescription("aaa", "group").String,
Optional: true,
Validators: []validator.String{
stringvalidator.OneOf("aaa", "group"),
Expand All @@ -135,7 +135,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"psk_authentication_pre_shared_key": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("PSK Pre Shared Key").String,
MarkdownDescription: helpers.NewAttributeDescription("PSK Pre Shared Key, Attribute conditional on `psk_authentication_type` being equal to `group`").String,
Optional: true,
Validators: []validator.String{
stringvalidator.LengthBetween(1, 25),
Expand Down Expand Up @@ -179,7 +179,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"aaa_derive_name_from_peer_identity": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("").String,
MarkdownDescription: helpers.NewAttributeDescription(", Attribute conditional on `connection_type_ssl` being equal to `false`").String,
Optional: true,
Validators: []validator.String{
stringvalidator.LengthBetween(1, 25),
Expand All @@ -190,7 +190,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"aaa_derive_name_from_peer_domain": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("").String,
MarkdownDescription: helpers.NewAttributeDescription(", Attribute conditional on `connection_type_ssl` being equal to `false`").String,
Optional: true,
Validators: []validator.String{
stringvalidator.LengthBetween(1, 25),
Expand All @@ -209,7 +209,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ikev2_local_ike_identity_type": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("").AddStringEnumDescription("EMAIL", "FQDN", "KEYID", "IPv4 ADDRESS", "IPv6 ADDRESS").String,
MarkdownDescription: helpers.NewAttributeDescription(", Attribute conditional on `connection_type_ssl` being equal to `false`").AddStringEnumDescription("EMAIL", "FQDN", "KEYID", "IPv4 ADDRESS", "IPv6 ADDRESS").String,
Optional: true,
Validators: []validator.String{
stringvalidator.OneOf("EMAIL", "FQDN", "KEYID", "IPv4 ADDRESS", "IPv6 ADDRESS"),
Expand All @@ -220,7 +220,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ikev2_local_ike_identity_value": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("").String,
MarkdownDescription: helpers.NewAttributeDescription(", Attribute conditional on `connection_type_ssl` being equal to `false`").String,
Optional: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
Expand All @@ -231,7 +231,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ikev2_security_association_lifetime": schema.Int64Attribute{
MarkdownDescription: helpers.NewAttributeDescription("Security Association Lifetime in Seconds").AddIntegerRangeDescription(3600, 86400).AddDefaultValueDescription("86400").String,
MarkdownDescription: helpers.NewAttributeDescription("Security Association Lifetime in Seconds, Attribute conditional on `connection_type_ssl` being equal to `false`").AddIntegerRangeDescription(3600, 86400).AddDefaultValueDescription("86400").String,
Optional: true,
Validators: []validator.Int64{
int64validator.Between(3600, 86400),
Expand All @@ -242,7 +242,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ikev2_anti_dos_threshold": schema.Int64Attribute{
MarkdownDescription: helpers.NewAttributeDescription("Anti-DOS Threshold").AddIntegerRangeDescription(10, 1000).AddDefaultValueDescription("100").String,
MarkdownDescription: helpers.NewAttributeDescription("Anti-DOS Threshold, Attribute conditional on `connection_type_ssl` being equal to `false`").AddIntegerRangeDescription(10, 1000).AddDefaultValueDescription("100").String,
Optional: true,
Validators: []validator.Int64{
int64validator.Between(10, 1000),
Expand All @@ -253,23 +253,23 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ipsec_enable_anti_replay": schema.BoolAttribute{
MarkdownDescription: helpers.NewAttributeDescription("Enable Anti-Replay").AddDefaultValueDescription("true").String,
MarkdownDescription: helpers.NewAttributeDescription("Enable Anti-Replay, Attribute conditional on `connection_type_ssl` being equal to `false`").AddDefaultValueDescription("true").String,
Optional: true,
},
"ipsec_enable_anti_replay_variable": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("Variable name").String,
Optional: true,
},
"ipsec_anti_replay_window_size": schema.Int64Attribute{
MarkdownDescription: helpers.NewAttributeDescription("security Association Lifetime").AddDefaultValueDescription("64").String,
MarkdownDescription: helpers.NewAttributeDescription("security Association Lifetime, Attribute conditional on `ipsec_enable_anti_replay` being equal to `true`").AddDefaultValueDescription("64").String,
Optional: true,
},
"ipsec_anti_replay_window_size_variable": schema.StringAttribute{
MarkdownDescription: helpers.NewAttributeDescription("Variable name").String,
Optional: true,
},
"ipsec_security_association_lifetime": schema.Int64Attribute{
MarkdownDescription: helpers.NewAttributeDescription("Security Association Lifetime in Seconds").AddIntegerRangeDescription(3600, 86400).AddDefaultValueDescription("3600").String,
MarkdownDescription: helpers.NewAttributeDescription("Security Association Lifetime in Seconds, Attribute conditional on `connection_type_ssl` being equal to `false`").AddIntegerRangeDescription(3600, 86400).AddDefaultValueDescription("3600").String,
Optional: true,
Validators: []validator.Int64{
int64validator.Between(3600, 86400),
Expand All @@ -280,7 +280,7 @@ func (r *SystemRemoteAccessProfileParcelResource) Schema(ctx context.Context, re
Optional: true,
},
"ipsec_enable_perfect_foward_secrecy": schema.BoolAttribute{
MarkdownDescription: helpers.NewAttributeDescription("security Association Lifetime").AddDefaultValueDescription("false").String,
MarkdownDescription: helpers.NewAttributeDescription("security Association Lifetime, Attribute conditional on `connection_type_ssl` being equal to `false`").AddDefaultValueDescription("false").String,
Optional: true,
},
"ipsec_enable_perfect_foward_secrecy_variable": schema.StringAttribute{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (r *TransportManagementVPNProfileParcelResource) Schema(ctx context.Context
},
},
"next_hops": schema.ListNestedAttribute{
MarkdownDescription: helpers.NewAttributeDescription("IPv4 Route Gateway Next Hop").String,
MarkdownDescription: helpers.NewAttributeDescription("IPv4 Route Gateway Next Hop, Attribute conditional on `gateway` being equal to `nextHop`").String,
Optional: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
Expand All @@ -219,7 +219,7 @@ func (r *TransportManagementVPNProfileParcelResource) Schema(ctx context.Context
},
},
"administrative_distance": schema.Int64Attribute{
MarkdownDescription: helpers.NewAttributeDescription("Administrative distance").AddIntegerRangeDescription(1, 255).AddDefaultValueDescription("1").String,
MarkdownDescription: helpers.NewAttributeDescription("Administrative distance, Attribute conditional on `gateway` being equal to `null0`").AddIntegerRangeDescription(1, 255).AddDefaultValueDescription("1").String,
Optional: true,
Validators: []validator.Int64{
int64validator.Between(1, 255),
Expand Down
Loading

0 comments on commit 0b3c4a1

Please sign in to comment.