From 39d6e51aaacbcf0ddd0ecb961dd7422577195b9a Mon Sep 17 00:00:00 2001 From: Sean Conroy Date: Wed, 2 Oct 2024 14:08:59 +0100 Subject: [PATCH] Resolve naming issue --- ...lication_priority_traffic_policy_policy.md | 22 +- ...lication_priority_traffic_policy_policy.md | 26 +- .../resource.tf | 4 +- .../application_priority_traffic_policy.yaml | 64 +--- ...lication_priority_traffic_policy_policy.go | 18 +- ...ion_priority_traffic_policy_policy_test.go | 4 +- ...lication_priority_traffic_policy_policy.go | 292 +++++++++--------- ...lication_priority_traffic_policy_policy.go | 18 +- ...ion_priority_traffic_policy_policy_test.go | 4 +- 9 files changed, 204 insertions(+), 248 deletions(-) diff --git a/docs/data-sources/application_priority_traffic_policy_policy.md b/docs/data-sources/application_priority_traffic_policy_policy.md index 9d67d7f6..ccff055f 100644 --- a/docs/data-sources/application_priority_traffic_policy_policy.md +++ b/docs/data-sources/application_priority_traffic_policy_policy.md @@ -35,7 +35,7 @@ data "sdwan_application_priority_traffic_policy_policy" "example" { - `name` (String) The name of the Policy - `sequences` (Attributes List) Traffic policy sequence list (see [below for nested schema](#nestedatt--sequences)) - `version` (Number) The version of the Policy -- `vpn` (Set of String) +- `vpns` (Set of String) ### Nested Schema for `sequences` @@ -71,11 +71,11 @@ Read-Only: - `redirect_dns_field` (String) - `redirect_dns_value` (String) - `secure_internet_gateway` (Boolean) -- `sets` (Attributes List) (see [below for nested schema](#nestedatt--sequences--actions--sets)) +- `set_parameters` (Attributes List) (see [below for nested schema](#nestedatt--sequences--actions--set_parameters)) - `sla_classes` (Attributes List) slaClass (see [below for nested schema](#nestedatt--sequences--actions--sla_classes)) - -### Nested Schema for `sequences.actions.sets` + +### Nested Schema for `sequences.actions.set_parameters` Read-Only: @@ -135,9 +135,9 @@ Read-Only: - `application_list_id` (String) - `destination_data_ipv4_prefix_list_id` (String) - `destination_data_ipv6_prefix_list_id` (String) -- `destination_ipv4` (String) Destination Data IP Prefix -- `destination_ipv6` (String) Destination Data IP Prefix -- `destination_port` (Set of String) Destination Port (0-65535) range or individual number separated by space +- `destination_ipv4_prefix` (String) Destination Data IP Prefix +- `destination_ipv6_prefix` (String) Destination Data IP Prefix +- `destination_ports` (Set of String) Destination Port (0-65535) range or individual number separated by space - `destination_region` (String) Destination Region - `dns` (String) Dns - `dns_application_list_id` (String) @@ -145,14 +145,14 @@ Read-Only: - `icmp6_message` (Set of String) ICMP6 Message - `icmp_message` (Set of String) ICMP Message - `packet_length` (String) Packet Length -- `protocol` (Set of String) protocol (0-255) range or individual number separated by space +- `protocols` (Set of String) protocol (0-255) range or individual number separated by space - `saas_application_list_id` (String) - `service_area` (Set of String) M365 Service Area - `source_data_ipv4_prefx_list_id` (String) - `source_data_ipv6_prefx_list_id` (String) -- `source_ipv4` (String) Source Data IP Prefix -- `source_ipv6` (String) Source Data IP Prefix -- `source_port` (Set of String) Source Port (0-65535) range or individual number separated by space +- `source_ipv4_prefix` (String) Source Data IP Prefix +- `source_ipv6_prefix` (String) Source Data IP Prefix +- `source_ports` (Set of String) Source Port (0-65535) range or individual number separated by space - `tcp` (String) TCP States - `traffic_category` (String) M365 Traffic Category - `traffic_class` (String) Traffic Class diff --git a/docs/resources/application_priority_traffic_policy_policy.md b/docs/resources/application_priority_traffic_policy_policy.md index cf6165e7..dac69eea 100644 --- a/docs/resources/application_priority_traffic_policy_policy.md +++ b/docs/resources/application_priority_traffic_policy_policy.md @@ -20,7 +20,7 @@ resource "sdwan_application_priority_traffic_policy_policy" "example" { description = "My Example" feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" default_action = "accept" - vpn = ["edge_basic_vpn1"] + vpns = ["Local_Internet_for_Guests"] direction = "all" sequences = [ { @@ -35,7 +35,7 @@ resource "sdwan_application_priority_traffic_policy_policy" "example" { ] actions = [ { - sets = [ + set_parameters = [ { } ] @@ -55,7 +55,7 @@ resource "sdwan_application_priority_traffic_policy_policy" "example" { - `direction` (String) - Choices: `service`, `tunnel`, `all` - `feature_profile_id` (String) Feature Profile ID - `name` (String) The name of the Policy -- `vpn` (Set of String) +- `vpns` (Set of String) ### Optional @@ -104,11 +104,11 @@ Optional: - `redirect_dns_field` (String) - Choices: `ipAddress`, `redirectDns` - `redirect_dns_value` (String) - `secure_internet_gateway` (Boolean) -- `sets` (Attributes List) (see [below for nested schema](#nestedatt--sequences--actions--sets)) +- `set_parameters` (Attributes List) (see [below for nested schema](#nestedatt--sequences--actions--set_parameters)) - `sla_classes` (Attributes List) slaClass (see [below for nested schema](#nestedatt--sequences--actions--sla_classes)) - -### Nested Schema for `sequences.actions.sets` + +### Nested Schema for `sequences.actions.set_parameters` Optional: @@ -168,9 +168,9 @@ Optional: - `application_list_id` (String) - `destination_data_ipv4_prefix_list_id` (String) - `destination_data_ipv6_prefix_list_id` (String) -- `destination_ipv4` (String) Destination Data IP Prefix -- `destination_ipv6` (String) Destination Data IP Prefix -- `destination_port` (Set of String) Destination Port (0-65535) range or individual number separated by space +- `destination_ipv4_prefix` (String) Destination Data IP Prefix +- `destination_ipv6_prefix` (String) Destination Data IP Prefix +- `destination_ports` (Set of String) Destination Port (0-65535) range or individual number separated by space - `destination_region` (String) Destination Region - Choices: `primary-region`, `secondary-region`, `other-region` - `dns` (String) Dns @@ -181,14 +181,14 @@ Optional: - `icmp6_message` (Set of String) ICMP6 Message - `icmp_message` (Set of String) ICMP Message - `packet_length` (String) Packet Length -- `protocol` (Set of String) protocol (0-255) range or individual number separated by space +- `protocols` (Set of String) protocol (0-255) range or individual number separated by space - `saas_application_list_id` (String) - `service_area` (Set of String) M365 Service Area - `source_data_ipv4_prefx_list_id` (String) - `source_data_ipv6_prefx_list_id` (String) -- `source_ipv4` (String) Source Data IP Prefix -- `source_ipv6` (String) Source Data IP Prefix -- `source_port` (Set of String) Source Port (0-65535) range or individual number separated by space +- `source_ipv4_prefix` (String) Source Data IP Prefix +- `source_ipv6_prefix` (String) Source Data IP Prefix +- `source_ports` (Set of String) Source Port (0-65535) range or individual number separated by space - `tcp` (String) TCP States - Choices: `syn` - `traffic_category` (String) M365 Traffic Category diff --git a/examples/resources/sdwan_application_priority_traffic_policy_policy/resource.tf b/examples/resources/sdwan_application_priority_traffic_policy_policy/resource.tf index 749f8e14..b641028f 100644 --- a/examples/resources/sdwan_application_priority_traffic_policy_policy/resource.tf +++ b/examples/resources/sdwan_application_priority_traffic_policy_policy/resource.tf @@ -3,7 +3,7 @@ resource "sdwan_application_priority_traffic_policy_policy" "example" { description = "My Example" feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" default_action = "accept" - vpn = ["edge_basic_vpn1"] + vpns = ["Local_Internet_for_Guests"] direction = "all" sequences = [ { @@ -18,7 +18,7 @@ resource "sdwan_application_priority_traffic_policy_policy" "example" { ] actions = [ { - sets = [ + set_parameters = [ { } ] diff --git a/gen/definitions/profile_parcels/application_priority_traffic_policy.yaml b/gen/definitions/profile_parcels/application_priority_traffic_policy.yaml index 7ef8f21e..f6a82e3f 100644 --- a/gen/definitions/profile_parcels/application_priority_traffic_policy.yaml +++ b/gen/definitions/profile_parcels/application_priority_traffic_policy.yaml @@ -14,28 +14,24 @@ attributes: description: Feature Profile ID example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac test_value: sdwan_application_priority_feature_profile.test.id - - model_name: dataDefaultAction tf_name: default_action example: accept - # # ==== Unable to find in UI ==== # - model_name: simpleFlow # exclude_test: true # example: - # # ==== Unable to find in UI ==== # - model_name: hasCorViaSig # exclude_test: true # example: - - model_name: vpn + tf_name: vpns data_path: [target] - example: "edge_basic_vpn1" + example: "Local_Internet_for_Guests" - model_name: direction data_path: [target] example: all - - model_name: sequences attributes: - model_name: sequenceId @@ -48,37 +44,31 @@ attributes: - model_name: sequenceIpType tf_name: protocol example: ipv4 - - model_name: entries tf_name: matches data_path: [match] attributes: - - model_name: refId tf_name: application_list_id data_path: [appList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: refId tf_name: saas_application_list_id data_path: [saasAppList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: serviceArea exclude_test: true example: common - model_name: trafficCategory exclude_test: true example: optimize-allow - - model_name: refId tf_name: dns_application_list_id data_path: [dnsAppList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: trafficClass exclude_test: true example: silver @@ -89,6 +79,7 @@ attributes: exclude_test: true example: 123 - model_name: protocol + tf_name: protocols exclude_test: true example: 2 - model_name: icmpMessage @@ -102,48 +93,45 @@ attributes: data_path: [sourceDataPrefixList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: refId tf_name: source_data_ipv6_prefx_list_id data_path: [sourceDataIpv6PrefixList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: sourceIp - tf_name: source_ipv4 + tf_name: source_ipv4_prefix exclude_test: true example: 1.2.3.4 - model_name: sourceIpv6 - tf_name: source_ipv6 + tf_name: source_ipv6_prefix exclude_test: true example: 2001:0:0:1::/64 - model_name: sourcePort + tf_name: source_ports exclude_test: true example: 1234 - - model_name: refId tf_name: destination_data_ipv4_prefix_list_id data_path: [destinationDataPrefixList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: refId tf_name: destination_data_ipv6_prefix_list_id data_path: [destinationDataIpv6PrefixList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - model_name: destinationIp - tf_name: destination_ipv4 + tf_name: destination_ipv4_prefix exclude_test: true example: 2.3.4.5 - model_name: destinationIpv6 - tf_name: destination_ipv6 + tf_name: destination_ipv6_prefix exclude_test: true example: 2001:0:0:2::/64 - model_name: destinationPort + tf_name: destination_ports exclude_test: true example: 2345 - - model_name: tcp exclude_test: true example: syn @@ -156,11 +144,9 @@ attributes: - model_name: dns exclude_test: true example: response - - model_name: actions tf_name: actions attributes: - - model_name: slaClass tf_name: sla_classes exclude_null: true @@ -171,17 +157,14 @@ attributes: data_path: [slaName] exclude_test: true example: 01249501-650f-484a-bfc0-b5837a558ce5 - - model_name: preferredColor exclude_test: true example: gold - - model_name: refId tf_name: preferred_color_group_list_id data_path: [preferredColorGroup] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: strict exclude_test: true example: true @@ -194,38 +177,32 @@ attributes: - model_name: remoteColorRestrict exclude_test: true example: true - - model_name: backupSlaPreferredColor exclude_test: true example: blue - - model_name: set - tf_name: sets + tf_name: set_parameters exclude_null: true attributes: - model_name: dscp exclude_test: true example: 18 - - model_name: refId tf_name: policer_id data_path: [policer] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 # test_value: sdwan_policy_object_policer_profile_parcel.test.id - - model_name: refId tf_name: preferred_color_group_id data_path: [preferredColorGroup] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: refId data_path: [forwardingClass] tf_name: forwarding_class_list_id exclude_test: true example: 159f4020-666f-4b05-8740-67816b7911df - - model_name: color tf_name: local_tloc_list_color data_path: [localTlocList] @@ -241,7 +218,6 @@ attributes: data_path: [localTlocList] exclude_test: true example: gre - - model_name: color tf_name: preferred_remote_color_id data_path: [preferredRemoteColor] @@ -252,7 +228,6 @@ attributes: data_path: [preferredRemoteColor] exclude_test: true example: false - - model_name: color tf_name: tloc_color data_path: [tloc] @@ -268,13 +243,11 @@ attributes: data_path: [tloc] exclude_test: true example: 1.2.3.4 - - model_name: refId tf_name: tloc_list_id data_path: [tlocList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: color tf_name: service_tloc_color data_path: [service, tloc] @@ -290,7 +263,6 @@ attributes: data_path: [service, tloc] exclude_test: true example: 1.2.3.4 - - model_name: vpn tf_name: service_vpn data_path: [service] @@ -301,13 +273,11 @@ attributes: data_path: [service] exclude_test: true example: FW - - model_name: refId tf_name: service_tloc_list_id data_path: [service, tlocList] exclude_test: true example: b1b45f19-69f4-44c5-8e0a-15a14b77a435 - - model_name: type tf_name: service_chain_type data_path: [serviceChain] @@ -348,7 +318,6 @@ attributes: data_path: [serviceChain, tlocList] exclude_test: true example: a509839f-33aa-492a-ab8e-6a6fe70d7d79 - - model_name: nextHop tf_name: next_hop_ipv4 exclude_test: true @@ -360,11 +329,9 @@ attributes: - model_name: nextHopLoose exclude_test: true example: false - - model_name: vpn exclude_test: true example: 1 - - model_name: field tf_name: redirect_dns_field data_path: [redirectDns] @@ -375,28 +342,24 @@ attributes: data_path: [redirectDns] exclude_test: true example: umbrella - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: tcpOptimization # tf_name: appqoe_tcp_optimization # data_path: [appqoeOptimization] # exclude_test: true # example: true - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: dreOptimization # tf_name: appqoe_dre_optimization # data_path: [appqoeOptimization] # exclude_test: true # example: true - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: serviceNodeGroup # tf_name: appqoe_service_node_group # data_path: [appqoeOptimization] # exclude_test: true # example: SNG-APPQOE1 - - model_name: lossCorrectionType tf_name: loss_correct_type data_path: [lossCorrection] @@ -407,26 +370,22 @@ attributes: data_path: [lossCorrection] exclude_test: true example: 1 - - model_name: count exclude_test: true example: COUNTER_1 - model_name: log exclude_test: true example: false - - model_name: cloudSaas exclude_test: true example: false - model_name: cloudProbe exclude_test: true example: false - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: cflowd # exclude_test: true # example: false - - model_name: natPool exclude_test: true example: 2 @@ -455,7 +414,6 @@ attributes: data_path: [nat] exclude_test: true example: ethernet - - model_name: sig tf_name: secure_internet_gateway exclude_test: true @@ -463,13 +421,11 @@ attributes: - model_name: fallbackToRouting exclude_test: true example: true - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: secureServiceEdge # data_path: [sse] # exclude_test: true # example: true - # # === Not Support in 20.12 (Supported in 20.15) === # - model_name: secureServiceEdgeInstance # data_path: [sse] diff --git a/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy.go b/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy.go index 1ce7a992..25617b92 100644 --- a/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy.go +++ b/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy.go @@ -82,7 +82,7 @@ func (d *ApplicationPriorityTrafficPolicyProfileParcelDataSource) Schema(ctx con MarkdownDescription: "", Computed: true, }, - "vpn": schema.SetAttribute{ + "vpns": schema.SetAttribute{ MarkdownDescription: "", ElementType: types.StringType, Computed: true, @@ -150,7 +150,7 @@ func (d *ApplicationPriorityTrafficPolicyProfileParcelDataSource) Schema(ctx con MarkdownDescription: "Packet Length", Computed: true, }, - "protocol": schema.SetAttribute{ + "protocols": schema.SetAttribute{ MarkdownDescription: "protocol (0-255) range or individual number separated by space", ElementType: types.StringType, Computed: true, @@ -173,15 +173,15 @@ func (d *ApplicationPriorityTrafficPolicyProfileParcelDataSource) Schema(ctx con MarkdownDescription: "", Computed: true, }, - "source_ipv4": schema.StringAttribute{ + "source_ipv4_prefix": schema.StringAttribute{ MarkdownDescription: "Source Data IP Prefix", Computed: true, }, - "source_ipv6": schema.StringAttribute{ + "source_ipv6_prefix": schema.StringAttribute{ MarkdownDescription: "Source Data IP Prefix", Computed: true, }, - "source_port": schema.SetAttribute{ + "source_ports": schema.SetAttribute{ MarkdownDescription: "Source Port (0-65535) range or individual number separated by space", ElementType: types.StringType, Computed: true, @@ -194,15 +194,15 @@ func (d *ApplicationPriorityTrafficPolicyProfileParcelDataSource) Schema(ctx con MarkdownDescription: "", Computed: true, }, - "destination_ipv4": schema.StringAttribute{ + "destination_ipv4_prefix": schema.StringAttribute{ MarkdownDescription: "Destination Data IP Prefix", Computed: true, }, - "destination_ipv6": schema.StringAttribute{ + "destination_ipv6_prefix": schema.StringAttribute{ MarkdownDescription: "Destination Data IP Prefix", Computed: true, }, - "destination_port": schema.SetAttribute{ + "destination_ports": schema.SetAttribute{ MarkdownDescription: "Destination Port (0-65535) range or individual number separated by space", ElementType: types.StringType, Computed: true, @@ -274,7 +274,7 @@ func (d *ApplicationPriorityTrafficPolicyProfileParcelDataSource) Schema(ctx con ElementType: types.StringType, Computed: true, }, - "sets": schema.ListNestedAttribute{ + "set_parameters": schema.ListNestedAttribute{ MarkdownDescription: "", Computed: true, NestedObject: schema.NestedAttributeObject{ diff --git a/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy_test.go b/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy_test.go index c122f2ed..12d4f2e7 100644 --- a/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy_test.go +++ b/internal/provider/data_source_sdwan_application_priority_traffic_policy_policy_test.go @@ -89,7 +89,7 @@ func testAccDataSourceSdwanApplicationPriorityTrafficPolicyProfileParcelConfig() config += ` description = "Terraform integration test"` + "\n" config += ` feature_profile_id = sdwan_application_priority_feature_profile.test.id` + "\n" config += ` default_action = "accept"` + "\n" - config += ` vpn = ["edge_basic_vpn1"]` + "\n" + config += ` vpns = ["Local_Internet_for_Guests"]` + "\n" config += ` direction = "all"` + "\n" config += ` sequences = [{` + "\n" config += ` sequence_id = 1` + "\n" @@ -100,7 +100,7 @@ func testAccDataSourceSdwanApplicationPriorityTrafficPolicyProfileParcelConfig() config += ` dscp = 1` + "\n" config += ` }]` + "\n" config += ` actions = [{` + "\n" - config += ` sets = [{` + "\n" + config += ` set_parameters = [{` + "\n" config += ` }]` + "\n" config += ` }]` + "\n" config += ` }]` + "\n" diff --git a/internal/provider/model_sdwan_application_priority_traffic_policy_policy.go b/internal/provider/model_sdwan_application_priority_traffic_policy_policy.go index e7e1b79b..0ef79a5c 100644 --- a/internal/provider/model_sdwan_application_priority_traffic_policy_policy.go +++ b/internal/provider/model_sdwan_application_priority_traffic_policy_policy.go @@ -40,7 +40,7 @@ type ApplicationPriorityTrafficPolicy struct { Description types.String `tfsdk:"description"` FeatureProfileId types.String `tfsdk:"feature_profile_id"` DefaultAction types.String `tfsdk:"default_action"` - Vpn types.Set `tfsdk:"vpn"` + Vpns types.Set `tfsdk:"vpns"` Direction types.String `tfsdk:"direction"` Sequences []ApplicationPriorityTrafficPolicySequences `tfsdk:"sequences"` } @@ -63,44 +63,44 @@ type ApplicationPriorityTrafficPolicySequencesMatches struct { TrafficClass types.String `tfsdk:"traffic_class"` Dscp types.Int64 `tfsdk:"dscp"` PacketLength types.String `tfsdk:"packet_length"` - Protocol types.Set `tfsdk:"protocol"` + Protocols types.Set `tfsdk:"protocols"` IcmpMessage types.Set `tfsdk:"icmp_message"` Icmp6Message types.Set `tfsdk:"icmp6_message"` SourceDataIpv4PrefxListId types.String `tfsdk:"source_data_ipv4_prefx_list_id"` SourceDataIpv6PrefxListId types.String `tfsdk:"source_data_ipv6_prefx_list_id"` - SourceIpv4 types.String `tfsdk:"source_ipv4"` - SourceIpv6 types.String `tfsdk:"source_ipv6"` - SourcePort types.Set `tfsdk:"source_port"` + SourceIpv4Prefix types.String `tfsdk:"source_ipv4_prefix"` + SourceIpv6Prefix types.String `tfsdk:"source_ipv6_prefix"` + SourcePorts types.Set `tfsdk:"source_ports"` DestinationDataIpv4PrefixListId types.String `tfsdk:"destination_data_ipv4_prefix_list_id"` DestinationDataIpv6PrefixListId types.String `tfsdk:"destination_data_ipv6_prefix_list_id"` - DestinationIpv4 types.String `tfsdk:"destination_ipv4"` - DestinationIpv6 types.String `tfsdk:"destination_ipv6"` - DestinationPort types.Set `tfsdk:"destination_port"` + DestinationIpv4Prefix types.String `tfsdk:"destination_ipv4_prefix"` + DestinationIpv6Prefix types.String `tfsdk:"destination_ipv6_prefix"` + DestinationPorts types.Set `tfsdk:"destination_ports"` Tcp types.String `tfsdk:"tcp"` DestinationRegion types.String `tfsdk:"destination_region"` TrafficTo types.String `tfsdk:"traffic_to"` Dns types.String `tfsdk:"dns"` } type ApplicationPriorityTrafficPolicySequencesActions struct { - SlaClasses []ApplicationPriorityTrafficPolicySequencesActionsSlaClasses `tfsdk:"sla_classes"` - BackupSlaPreferredColor types.Set `tfsdk:"backup_sla_preferred_color"` - Sets []ApplicationPriorityTrafficPolicySequencesActionsSets `tfsdk:"sets"` - RedirectDnsField types.String `tfsdk:"redirect_dns_field"` - RedirectDnsValue types.String `tfsdk:"redirect_dns_value"` - LossCorrectType types.String `tfsdk:"loss_correct_type"` - LossCorrectFecThreshold types.Int64 `tfsdk:"loss_correct_fec_threshold"` - Count types.String `tfsdk:"count"` - Log types.Bool `tfsdk:"log"` - CloudSaas types.Bool `tfsdk:"cloud_saas"` - CloudProbe types.Bool `tfsdk:"cloud_probe"` - NatPool types.Int64 `tfsdk:"nat_pool"` - NatVpn types.Bool `tfsdk:"nat_vpn"` - NatFallback types.Bool `tfsdk:"nat_fallback"` - NatBypass types.Bool `tfsdk:"nat_bypass"` - NatDiaPool types.Set `tfsdk:"nat_dia_pool"` - NatDiaInterface types.Set `tfsdk:"nat_dia_interface"` - SecureInternetGateway types.Bool `tfsdk:"secure_internet_gateway"` - FallbackToRouting types.Bool `tfsdk:"fallback_to_routing"` + SlaClasses []ApplicationPriorityTrafficPolicySequencesActionsSlaClasses `tfsdk:"sla_classes"` + BackupSlaPreferredColor types.Set `tfsdk:"backup_sla_preferred_color"` + SetParameters []ApplicationPriorityTrafficPolicySequencesActionsSetParameters `tfsdk:"set_parameters"` + RedirectDnsField types.String `tfsdk:"redirect_dns_field"` + RedirectDnsValue types.String `tfsdk:"redirect_dns_value"` + LossCorrectType types.String `tfsdk:"loss_correct_type"` + LossCorrectFecThreshold types.Int64 `tfsdk:"loss_correct_fec_threshold"` + Count types.String `tfsdk:"count"` + Log types.Bool `tfsdk:"log"` + CloudSaas types.Bool `tfsdk:"cloud_saas"` + CloudProbe types.Bool `tfsdk:"cloud_probe"` + NatPool types.Int64 `tfsdk:"nat_pool"` + NatVpn types.Bool `tfsdk:"nat_vpn"` + NatFallback types.Bool `tfsdk:"nat_fallback"` + NatBypass types.Bool `tfsdk:"nat_bypass"` + NatDiaPool types.Set `tfsdk:"nat_dia_pool"` + NatDiaInterface types.Set `tfsdk:"nat_dia_interface"` + SecureInternetGateway types.Bool `tfsdk:"secure_internet_gateway"` + FallbackToRouting types.Bool `tfsdk:"fallback_to_routing"` } type ApplicationPriorityTrafficPolicySequencesActionsSlaClasses struct { @@ -112,7 +112,7 @@ type ApplicationPriorityTrafficPolicySequencesActionsSlaClasses struct { PreferredRemoteColor types.Set `tfsdk:"preferred_remote_color"` RemoteColorRestrict types.Bool `tfsdk:"remote_color_restrict"` } -type ApplicationPriorityTrafficPolicySequencesActionsSets struct { +type ApplicationPriorityTrafficPolicySequencesActionsSetParameters struct { Dscp types.Int64 `tfsdk:"dscp"` PolicerId types.String `tfsdk:"policer_id"` PreferredColorGroupId types.String `tfsdk:"preferred_color_group_id"` @@ -174,11 +174,11 @@ func (data ApplicationPriorityTrafficPolicy) toBody(ctx context.Context) string body, _ = sjson.Set(body, path+"dataDefaultAction.value", data.DefaultAction.ValueString()) } } - if !data.Vpn.IsNull() { + if !data.Vpns.IsNull() { if true { body, _ = sjson.Set(body, path+"target.vpn.optionType", "global") var values []string - data.Vpn.ElementsAs(ctx, &values, false) + data.Vpns.ElementsAs(ctx, &values, false) body, _ = sjson.Set(body, path+"target.vpn.value", values) } } @@ -270,11 +270,11 @@ func (data ApplicationPriorityTrafficPolicy) toBody(ctx context.Context) string itemChildBody, _ = sjson.Set(itemChildBody, "packetLength.value", childItem.PacketLength.ValueString()) } } - if !childItem.Protocol.IsNull() { + if !childItem.Protocols.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "protocol.optionType", "global") var values []string - childItem.Protocol.ElementsAs(ctx, &values, false) + childItem.Protocols.ElementsAs(ctx, &values, false) itemChildBody, _ = sjson.Set(itemChildBody, "protocol.value", values) } } @@ -306,23 +306,23 @@ func (data ApplicationPriorityTrafficPolicy) toBody(ctx context.Context) string itemChildBody, _ = sjson.Set(itemChildBody, "sourceDataIpv6PrefixList.refId.value", childItem.SourceDataIpv6PrefxListId.ValueString()) } } - if !childItem.SourceIpv4.IsNull() { + if !childItem.SourceIpv4Prefix.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "sourceIp.optionType", "global") - itemChildBody, _ = sjson.Set(itemChildBody, "sourceIp.value", childItem.SourceIpv4.ValueString()) + itemChildBody, _ = sjson.Set(itemChildBody, "sourceIp.value", childItem.SourceIpv4Prefix.ValueString()) } } - if !childItem.SourceIpv6.IsNull() { + if !childItem.SourceIpv6Prefix.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "sourceIpv6.optionType", "global") - itemChildBody, _ = sjson.Set(itemChildBody, "sourceIpv6.value", childItem.SourceIpv6.ValueString()) + itemChildBody, _ = sjson.Set(itemChildBody, "sourceIpv6.value", childItem.SourceIpv6Prefix.ValueString()) } } - if !childItem.SourcePort.IsNull() { + if !childItem.SourcePorts.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "sourcePort.optionType", "global") var values []string - childItem.SourcePort.ElementsAs(ctx, &values, false) + childItem.SourcePorts.ElementsAs(ctx, &values, false) itemChildBody, _ = sjson.Set(itemChildBody, "sourcePort.value", values) } } @@ -338,23 +338,23 @@ func (data ApplicationPriorityTrafficPolicy) toBody(ctx context.Context) string itemChildBody, _ = sjson.Set(itemChildBody, "destinationDataIpv6PrefixList.refId.value", childItem.DestinationDataIpv6PrefixListId.ValueString()) } } - if !childItem.DestinationIpv4.IsNull() { + if !childItem.DestinationIpv4Prefix.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "destinationIp.optionType", "global") - itemChildBody, _ = sjson.Set(itemChildBody, "destinationIp.value", childItem.DestinationIpv4.ValueString()) + itemChildBody, _ = sjson.Set(itemChildBody, "destinationIp.value", childItem.DestinationIpv4Prefix.ValueString()) } } - if !childItem.DestinationIpv6.IsNull() { + if !childItem.DestinationIpv6Prefix.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "destinationIpv6.optionType", "global") - itemChildBody, _ = sjson.Set(itemChildBody, "destinationIpv6.value", childItem.DestinationIpv6.ValueString()) + itemChildBody, _ = sjson.Set(itemChildBody, "destinationIpv6.value", childItem.DestinationIpv6Prefix.ValueString()) } } - if !childItem.DestinationPort.IsNull() { + if !childItem.DestinationPorts.IsNull() { if true { itemChildBody, _ = sjson.Set(itemChildBody, "destinationPort.optionType", "global") var values []string - childItem.DestinationPort.ElementsAs(ctx, &values, false) + childItem.DestinationPorts.ElementsAs(ctx, &values, false) itemChildBody, _ = sjson.Set(itemChildBody, "destinationPort.value", values) } } @@ -452,7 +452,7 @@ func (data ApplicationPriorityTrafficPolicy) toBody(ctx context.Context) string } if true { - for _, childChildItem := range childItem.Sets { + for _, childChildItem := range childItem.SetParameters { itemChildChildBody := "" if !childChildItem.Dscp.IsNull() { if true { @@ -781,12 +781,12 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res data.DefaultAction = types.StringValue(va.String()) } } - data.Vpn = types.SetNull(types.StringType) + data.Vpns = types.SetNull(types.StringType) if t := res.Get(path + "target.vpn.optionType"); t.Exists() { va := res.Get(path + "target.vpn.value") if t.String() == "global" { - data.Vpn = helpers.GetStringSet(va.Array()) + data.Vpns = helpers.GetStringSet(va.Array()) } } data.Direction = types.StringNull() @@ -901,12 +901,12 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res cItem.PacketLength = types.StringValue(va.String()) } } - cItem.Protocol = types.SetNull(types.StringType) + cItem.Protocols = types.SetNull(types.StringType) if t := cv.Get("protocol.optionType"); t.Exists() { va := cv.Get("protocol.value") if t.String() == "global" { - cItem.Protocol = helpers.GetStringSet(va.Array()) + cItem.Protocols = helpers.GetStringSet(va.Array()) } } cItem.IcmpMessage = types.SetNull(types.StringType) @@ -941,28 +941,28 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res cItem.SourceDataIpv6PrefxListId = types.StringValue(va.String()) } } - cItem.SourceIpv4 = types.StringNull() + cItem.SourceIpv4Prefix = types.StringNull() if t := cv.Get("sourceIp.optionType"); t.Exists() { va := cv.Get("sourceIp.value") if t.String() == "global" { - cItem.SourceIpv4 = types.StringValue(va.String()) + cItem.SourceIpv4Prefix = types.StringValue(va.String()) } } - cItem.SourceIpv6 = types.StringNull() + cItem.SourceIpv6Prefix = types.StringNull() if t := cv.Get("sourceIpv6.optionType"); t.Exists() { va := cv.Get("sourceIpv6.value") if t.String() == "global" { - cItem.SourceIpv6 = types.StringValue(va.String()) + cItem.SourceIpv6Prefix = types.StringValue(va.String()) } } - cItem.SourcePort = types.SetNull(types.StringType) + cItem.SourcePorts = types.SetNull(types.StringType) if t := cv.Get("sourcePort.optionType"); t.Exists() { va := cv.Get("sourcePort.value") if t.String() == "global" { - cItem.SourcePort = helpers.GetStringSet(va.Array()) + cItem.SourcePorts = helpers.GetStringSet(va.Array()) } } cItem.DestinationDataIpv4PrefixListId = types.StringNull() @@ -981,28 +981,28 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res cItem.DestinationDataIpv6PrefixListId = types.StringValue(va.String()) } } - cItem.DestinationIpv4 = types.StringNull() + cItem.DestinationIpv4Prefix = types.StringNull() if t := cv.Get("destinationIp.optionType"); t.Exists() { va := cv.Get("destinationIp.value") if t.String() == "global" { - cItem.DestinationIpv4 = types.StringValue(va.String()) + cItem.DestinationIpv4Prefix = types.StringValue(va.String()) } } - cItem.DestinationIpv6 = types.StringNull() + cItem.DestinationIpv6Prefix = types.StringNull() if t := cv.Get("destinationIpv6.optionType"); t.Exists() { va := cv.Get("destinationIpv6.value") if t.String() == "global" { - cItem.DestinationIpv6 = types.StringValue(va.String()) + cItem.DestinationIpv6Prefix = types.StringValue(va.String()) } } - cItem.DestinationPort = types.SetNull(types.StringType) + cItem.DestinationPorts = types.SetNull(types.StringType) if t := cv.Get("destinationPort.optionType"); t.Exists() { va := cv.Get("destinationPort.value") if t.String() == "global" { - cItem.DestinationPort = helpers.GetStringSet(va.Array()) + cItem.DestinationPorts = helpers.GetStringSet(va.Array()) } } cItem.Tcp = types.StringNull() @@ -1118,9 +1118,9 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res } } if ccValue := cv.Get("set"); ccValue.Exists() { - cItem.Sets = make([]ApplicationPriorityTrafficPolicySequencesActionsSets, 0) + cItem.SetParameters = make([]ApplicationPriorityTrafficPolicySequencesActionsSetParameters, 0) ccValue.ForEach(func(cck, ccv gjson.Result) bool { - ccItem := ApplicationPriorityTrafficPolicySequencesActionsSets{} + ccItem := ApplicationPriorityTrafficPolicySequencesActionsSetParameters{} ccItem.Dscp = types.Int64Null() if t := ccv.Get("dscp.optionType"); t.Exists() { @@ -1369,7 +1369,7 @@ func (data *ApplicationPriorityTrafficPolicy) fromBody(ctx context.Context, res ccItem.Vpn = types.StringValue(va.String()) } } - cItem.Sets = append(cItem.Sets, ccItem) + cItem.SetParameters = append(cItem.SetParameters, ccItem) return true }) } @@ -1530,12 +1530,12 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context data.DefaultAction = types.StringValue(va.String()) } } - data.Vpn = types.SetNull(types.StringType) + data.Vpns = types.SetNull(types.StringType) if t := res.Get(path + "target.vpn.optionType"); t.Exists() { va := res.Get(path + "target.vpn.value") if t.String() == "global" { - data.Vpn = helpers.GetStringSet(va.Array()) + data.Vpns = helpers.GetStringSet(va.Array()) } } data.Direction = types.StringNull() @@ -1609,7 +1609,7 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context } for ci := range data.Sequences[i].Matches { keys := [...]string{"appList.refId", "saasAppList.refId", "trafficCategory", "dnsAppList.refId", "trafficClass", "dscp", "packetLength", "sourceDataPrefixList.refId", "sourceDataIpv6PrefixList.refId", "sourceIp", "sourceIpv6", "destinationDataPrefixList.refId", "destinationDataIpv6PrefixList.refId", "destinationIp", "destinationIpv6", "tcp", "destinationRegion", "trafficTo", "dns"} - keyValues := [...]string{data.Sequences[i].Matches[ci].ApplicationListId.ValueString(), data.Sequences[i].Matches[ci].SaasApplicationListId.ValueString(), data.Sequences[i].Matches[ci].TrafficCategory.ValueString(), data.Sequences[i].Matches[ci].DnsApplicationListId.ValueString(), data.Sequences[i].Matches[ci].TrafficClass.ValueString(), strconv.FormatInt(data.Sequences[i].Matches[ci].Dscp.ValueInt64(), 10), data.Sequences[i].Matches[ci].PacketLength.ValueString(), data.Sequences[i].Matches[ci].SourceDataIpv4PrefxListId.ValueString(), data.Sequences[i].Matches[ci].SourceDataIpv6PrefxListId.ValueString(), data.Sequences[i].Matches[ci].SourceIpv4.ValueString(), data.Sequences[i].Matches[ci].SourceIpv6.ValueString(), data.Sequences[i].Matches[ci].DestinationDataIpv4PrefixListId.ValueString(), data.Sequences[i].Matches[ci].DestinationDataIpv6PrefixListId.ValueString(), data.Sequences[i].Matches[ci].DestinationIpv4.ValueString(), data.Sequences[i].Matches[ci].DestinationIpv6.ValueString(), data.Sequences[i].Matches[ci].Tcp.ValueString(), data.Sequences[i].Matches[ci].DestinationRegion.ValueString(), data.Sequences[i].Matches[ci].TrafficTo.ValueString(), data.Sequences[i].Matches[ci].Dns.ValueString()} + keyValues := [...]string{data.Sequences[i].Matches[ci].ApplicationListId.ValueString(), data.Sequences[i].Matches[ci].SaasApplicationListId.ValueString(), data.Sequences[i].Matches[ci].TrafficCategory.ValueString(), data.Sequences[i].Matches[ci].DnsApplicationListId.ValueString(), data.Sequences[i].Matches[ci].TrafficClass.ValueString(), strconv.FormatInt(data.Sequences[i].Matches[ci].Dscp.ValueInt64(), 10), data.Sequences[i].Matches[ci].PacketLength.ValueString(), data.Sequences[i].Matches[ci].SourceDataIpv4PrefxListId.ValueString(), data.Sequences[i].Matches[ci].SourceDataIpv6PrefxListId.ValueString(), data.Sequences[i].Matches[ci].SourceIpv4Prefix.ValueString(), data.Sequences[i].Matches[ci].SourceIpv6Prefix.ValueString(), data.Sequences[i].Matches[ci].DestinationDataIpv4PrefixListId.ValueString(), data.Sequences[i].Matches[ci].DestinationDataIpv6PrefixListId.ValueString(), data.Sequences[i].Matches[ci].DestinationIpv4Prefix.ValueString(), data.Sequences[i].Matches[ci].DestinationIpv6Prefix.ValueString(), data.Sequences[i].Matches[ci].Tcp.ValueString(), data.Sequences[i].Matches[ci].DestinationRegion.ValueString(), data.Sequences[i].Matches[ci].TrafficTo.ValueString(), data.Sequences[i].Matches[ci].Dns.ValueString()} keyValuesVariables := [...]string{"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""} var cr gjson.Result @@ -1700,12 +1700,12 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context data.Sequences[i].Matches[ci].PacketLength = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].Protocol = types.SetNull(types.StringType) + data.Sequences[i].Matches[ci].Protocols = types.SetNull(types.StringType) if t := cr.Get("protocol.optionType"); t.Exists() { va := cr.Get("protocol.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].Protocol = helpers.GetStringSet(va.Array()) + data.Sequences[i].Matches[ci].Protocols = helpers.GetStringSet(va.Array()) } } data.Sequences[i].Matches[ci].IcmpMessage = types.SetNull(types.StringType) @@ -1740,28 +1740,28 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context data.Sequences[i].Matches[ci].SourceDataIpv6PrefxListId = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].SourceIpv4 = types.StringNull() + data.Sequences[i].Matches[ci].SourceIpv4Prefix = types.StringNull() if t := cr.Get("sourceIp.optionType"); t.Exists() { va := cr.Get("sourceIp.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].SourceIpv4 = types.StringValue(va.String()) + data.Sequences[i].Matches[ci].SourceIpv4Prefix = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].SourceIpv6 = types.StringNull() + data.Sequences[i].Matches[ci].SourceIpv6Prefix = types.StringNull() if t := cr.Get("sourceIpv6.optionType"); t.Exists() { va := cr.Get("sourceIpv6.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].SourceIpv6 = types.StringValue(va.String()) + data.Sequences[i].Matches[ci].SourceIpv6Prefix = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].SourcePort = types.SetNull(types.StringType) + data.Sequences[i].Matches[ci].SourcePorts = types.SetNull(types.StringType) if t := cr.Get("sourcePort.optionType"); t.Exists() { va := cr.Get("sourcePort.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].SourcePort = helpers.GetStringSet(va.Array()) + data.Sequences[i].Matches[ci].SourcePorts = helpers.GetStringSet(va.Array()) } } data.Sequences[i].Matches[ci].DestinationDataIpv4PrefixListId = types.StringNull() @@ -1780,28 +1780,28 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context data.Sequences[i].Matches[ci].DestinationDataIpv6PrefixListId = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].DestinationIpv4 = types.StringNull() + data.Sequences[i].Matches[ci].DestinationIpv4Prefix = types.StringNull() if t := cr.Get("destinationIp.optionType"); t.Exists() { va := cr.Get("destinationIp.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].DestinationIpv4 = types.StringValue(va.String()) + data.Sequences[i].Matches[ci].DestinationIpv4Prefix = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].DestinationIpv6 = types.StringNull() + data.Sequences[i].Matches[ci].DestinationIpv6Prefix = types.StringNull() if t := cr.Get("destinationIpv6.optionType"); t.Exists() { va := cr.Get("destinationIpv6.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].DestinationIpv6 = types.StringValue(va.String()) + data.Sequences[i].Matches[ci].DestinationIpv6Prefix = types.StringValue(va.String()) } } - data.Sequences[i].Matches[ci].DestinationPort = types.SetNull(types.StringType) + data.Sequences[i].Matches[ci].DestinationPorts = types.SetNull(types.StringType) if t := cr.Get("destinationPort.optionType"); t.Exists() { va := cr.Get("destinationPort.value") if t.String() == "global" { - data.Sequences[i].Matches[ci].DestinationPort = helpers.GetStringSet(va.Array()) + data.Sequences[i].Matches[ci].DestinationPorts = helpers.GetStringSet(va.Array()) } } data.Sequences[i].Matches[ci].Tcp = types.StringNull() @@ -1960,9 +1960,9 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context data.Sequences[i].Actions[ci].BackupSlaPreferredColor = helpers.GetStringSet(va.Array()) } } - for cci := range data.Sequences[i].Actions[ci].Sets { + for cci := range data.Sequences[i].Actions[ci].SetParameters { keys := [...]string{"dscp", "policer.refId", "preferredColorGroup.refId", "forwardingClass.refId", "localTlocList.restrict", "localTlocList.encap", "preferredRemoteColor.remoteColorRestrict", "tloc.encap", "tloc.ip", "tlocList.refId", "service.tloc.encap", "service.tloc.ip", "service.vpn", "service.type", "service.tlocList.refId", "serviceChain.type", "serviceChain.vpn", "serviceChain.local", "serviceChain.restrict", "serviceChain.tloc.encap", "serviceChain.tloc.ip", "serviceChain.tlocList.refId", "nextHop", "nextHopIpv6", "nextHopLoose", "vpn"} - keyValues := [...]string{strconv.FormatInt(data.Sequences[i].Actions[ci].Sets[cci].Dscp.ValueInt64(), 10), data.Sequences[i].Actions[ci].Sets[cci].PolicerId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].PreferredColorGroupId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ForwardingClassListId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListRestrict.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListEncapsulation.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].PreferredRemoteColorRestrict.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].TlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].TlocIp.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].TlocListId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocIp.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceVpn.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceType.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocListId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceChainType.ValueString(), strconv.FormatInt(data.Sequences[i].Actions[ci].Sets[cci].ServiceChainVpn.ValueInt64(), 10), strconv.FormatBool(data.Sequences[i].Actions[ci].Sets[cci].ServiceChainLocal.ValueBool()), strconv.FormatBool(data.Sequences[i].Actions[ci].Sets[cci].ServiceChainFallbackToRouting.ValueBool()), data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocIp.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocListId.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv4.ValueString(), data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv6.ValueString(), strconv.FormatBool(data.Sequences[i].Actions[ci].Sets[cci].NextHopLoose.ValueBool()), data.Sequences[i].Actions[ci].Sets[cci].Vpn.ValueString()} + keyValues := [...]string{strconv.FormatInt(data.Sequences[i].Actions[ci].SetParameters[cci].Dscp.ValueInt64(), 10), data.Sequences[i].Actions[ci].SetParameters[cci].PolicerId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].PreferredColorGroupId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ForwardingClassListId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListRestrict.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListEncapsulation.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].PreferredRemoteColorRestrict.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].TlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].TlocIp.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].TlocListId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocIp.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceVpn.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceType.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocListId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainType.ValueString(), strconv.FormatInt(data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainVpn.ValueInt64(), 10), strconv.FormatBool(data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainLocal.ValueBool()), strconv.FormatBool(data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainFallbackToRouting.ValueBool()), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocEncapsulation.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocIp.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocListId.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv4.ValueString(), data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv6.ValueString(), strconv.FormatBool(data.Sequences[i].Actions[ci].SetParameters[cci].NextHopLoose.ValueBool()), data.Sequences[i].Actions[ci].SetParameters[cci].Vpn.ValueString()} keyValuesVariables := [...]string{"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""} var ccr gjson.Result @@ -1989,252 +1989,252 @@ func (data *ApplicationPriorityTrafficPolicy) updateFromBody(ctx context.Context return true }, ) - data.Sequences[i].Actions[ci].Sets[cci].Dscp = types.Int64Null() + data.Sequences[i].Actions[ci].SetParameters[cci].Dscp = types.Int64Null() if t := ccr.Get("dscp.optionType"); t.Exists() { va := ccr.Get("dscp.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].Dscp = types.Int64Value(va.Int()) + data.Sequences[i].Actions[ci].SetParameters[cci].Dscp = types.Int64Value(va.Int()) } } - data.Sequences[i].Actions[ci].Sets[cci].PolicerId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].PolicerId = types.StringNull() if t := ccr.Get("policer.refId.optionType"); t.Exists() { va := ccr.Get("policer.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].PolicerId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].PolicerId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].PreferredColorGroupId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredColorGroupId = types.StringNull() if t := ccr.Get("preferredColorGroup.refId.optionType"); t.Exists() { va := ccr.Get("preferredColorGroup.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].PreferredColorGroupId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredColorGroupId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ForwardingClassListId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ForwardingClassListId = types.StringNull() if t := ccr.Get("forwardingClass.refId.optionType"); t.Exists() { va := ccr.Get("forwardingClass.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ForwardingClassListId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ForwardingClassListId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListColor = types.SetNull(types.StringType) + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListColor = types.SetNull(types.StringType) if t := ccr.Get("localTlocList.color.optionType"); t.Exists() { va := ccr.Get("localTlocList.color.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListColor = helpers.GetStringSet(va.Array()) + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListColor = helpers.GetStringSet(va.Array()) } } - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListRestrict = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListRestrict = types.StringNull() if t := ccr.Get("localTlocList.restrict.optionType"); t.Exists() { va := ccr.Get("localTlocList.restrict.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListRestrict = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListRestrict = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListEncapsulation = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListEncapsulation = types.StringNull() if t := ccr.Get("localTlocList.encap.optionType"); t.Exists() { va := ccr.Get("localTlocList.encap.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].LocalTlocListEncapsulation = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].LocalTlocListEncapsulation = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].PreferredRemoteColorId = types.SetNull(types.StringType) + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredRemoteColorId = types.SetNull(types.StringType) if t := ccr.Get("preferredRemoteColor.color.optionType"); t.Exists() { va := ccr.Get("preferredRemoteColor.color.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].PreferredRemoteColorId = helpers.GetStringSet(va.Array()) + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredRemoteColorId = helpers.GetStringSet(va.Array()) } } - data.Sequences[i].Actions[ci].Sets[cci].PreferredRemoteColorRestrict = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredRemoteColorRestrict = types.StringNull() if t := ccr.Get("preferredRemoteColor.remoteColorRestrict.optionType"); t.Exists() { va := ccr.Get("preferredRemoteColor.remoteColorRestrict.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].PreferredRemoteColorRestrict = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].PreferredRemoteColorRestrict = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].TlocColor = types.SetNull(types.StringType) + data.Sequences[i].Actions[ci].SetParameters[cci].TlocColor = types.SetNull(types.StringType) if t := ccr.Get("tloc.color.optionType"); t.Exists() { va := ccr.Get("tloc.color.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].TlocColor = helpers.GetStringSet(va.Array()) + data.Sequences[i].Actions[ci].SetParameters[cci].TlocColor = helpers.GetStringSet(va.Array()) } } - data.Sequences[i].Actions[ci].Sets[cci].TlocEncapsulation = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].TlocEncapsulation = types.StringNull() if t := ccr.Get("tloc.encap.optionType"); t.Exists() { va := ccr.Get("tloc.encap.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].TlocEncapsulation = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].TlocEncapsulation = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].TlocIp = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].TlocIp = types.StringNull() if t := ccr.Get("tloc.ip.optionType"); t.Exists() { va := ccr.Get("tloc.ip.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].TlocIp = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].TlocIp = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].TlocListId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].TlocListId = types.StringNull() if t := ccr.Get("tlocList.refId.optionType"); t.Exists() { va := ccr.Get("tlocList.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].TlocListId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].TlocListId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocColor = types.SetNull(types.StringType) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocColor = types.SetNull(types.StringType) if t := ccr.Get("service.tloc.color.optionType"); t.Exists() { va := ccr.Get("service.tloc.color.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocColor = helpers.GetStringSet(va.Array()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocColor = helpers.GetStringSet(va.Array()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocEncapsulation = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocEncapsulation = types.StringNull() if t := ccr.Get("service.tloc.encap.optionType"); t.Exists() { va := ccr.Get("service.tloc.encap.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocEncapsulation = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocEncapsulation = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocIp = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocIp = types.StringNull() if t := ccr.Get("service.tloc.ip.optionType"); t.Exists() { va := ccr.Get("service.tloc.ip.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocIp = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocIp = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceVpn = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceVpn = types.StringNull() if t := ccr.Get("service.vpn.optionType"); t.Exists() { va := ccr.Get("service.vpn.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceVpn = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceVpn = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceType = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceType = types.StringNull() if t := ccr.Get("service.type.optionType"); t.Exists() { va := ccr.Get("service.type.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceType = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceType = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocListId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocListId = types.StringNull() if t := ccr.Get("service.tlocList.refId.optionType"); t.Exists() { va := ccr.Get("service.tlocList.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceTlocListId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceTlocListId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainType = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainType = types.StringNull() if t := ccr.Get("serviceChain.type.optionType"); t.Exists() { va := ccr.Get("serviceChain.type.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainType = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainType = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainVpn = types.Int64Null() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainVpn = types.Int64Null() if t := ccr.Get("serviceChain.vpn.optionType"); t.Exists() { va := ccr.Get("serviceChain.vpn.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainVpn = types.Int64Value(va.Int()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainVpn = types.Int64Value(va.Int()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainLocal = types.BoolNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainLocal = types.BoolNull() if t := ccr.Get("serviceChain.local.optionType"); t.Exists() { va := ccr.Get("serviceChain.local.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainLocal = types.BoolValue(va.Bool()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainLocal = types.BoolValue(va.Bool()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainFallbackToRouting = types.BoolNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainFallbackToRouting = types.BoolNull() if t := ccr.Get("serviceChain.restrict.optionType"); t.Exists() { va := ccr.Get("serviceChain.restrict.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainFallbackToRouting = types.BoolValue(va.Bool()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainFallbackToRouting = types.BoolValue(va.Bool()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocColor = types.SetNull(types.StringType) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocColor = types.SetNull(types.StringType) if t := ccr.Get("serviceChain.tloc.color.optionType"); t.Exists() { va := ccr.Get("serviceChain.tloc.color.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocColor = helpers.GetStringSet(va.Array()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocColor = helpers.GetStringSet(va.Array()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocEncapsulation = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocEncapsulation = types.StringNull() if t := ccr.Get("serviceChain.tloc.encap.optionType"); t.Exists() { va := ccr.Get("serviceChain.tloc.encap.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocEncapsulation = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocEncapsulation = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocIp = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocIp = types.StringNull() if t := ccr.Get("serviceChain.tloc.ip.optionType"); t.Exists() { va := ccr.Get("serviceChain.tloc.ip.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocIp = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocIp = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocListId = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocListId = types.StringNull() if t := ccr.Get("serviceChain.tlocList.refId.optionType"); t.Exists() { va := ccr.Get("serviceChain.tlocList.refId.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].ServiceChainTlocListId = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].ServiceChainTlocListId = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv4 = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv4 = types.StringNull() if t := ccr.Get("nextHop.optionType"); t.Exists() { va := ccr.Get("nextHop.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv4 = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv4 = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv6 = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv6 = types.StringNull() if t := ccr.Get("nextHopIpv6.optionType"); t.Exists() { va := ccr.Get("nextHopIpv6.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].NextHopIpv6 = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopIpv6 = types.StringValue(va.String()) } } - data.Sequences[i].Actions[ci].Sets[cci].NextHopLoose = types.BoolNull() + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopLoose = types.BoolNull() if t := ccr.Get("nextHopLoose.optionType"); t.Exists() { va := ccr.Get("nextHopLoose.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].NextHopLoose = types.BoolValue(va.Bool()) + data.Sequences[i].Actions[ci].SetParameters[cci].NextHopLoose = types.BoolValue(va.Bool()) } } - data.Sequences[i].Actions[ci].Sets[cci].Vpn = types.StringNull() + data.Sequences[i].Actions[ci].SetParameters[cci].Vpn = types.StringNull() if t := ccr.Get("vpn.optionType"); t.Exists() { va := ccr.Get("vpn.value") if t.String() == "global" { - data.Sequences[i].Actions[ci].Sets[cci].Vpn = types.StringValue(va.String()) + data.Sequences[i].Actions[ci].SetParameters[cci].Vpn = types.StringValue(va.String()) } } } @@ -2380,7 +2380,7 @@ func (data *ApplicationPriorityTrafficPolicy) isNull(ctx context.Context, res gj if !data.DefaultAction.IsNull() { return false } - if !data.Vpn.IsNull() { + if !data.Vpns.IsNull() { return false } if !data.Direction.IsNull() { diff --git a/internal/provider/resource_sdwan_application_priority_traffic_policy_policy.go b/internal/provider/resource_sdwan_application_priority_traffic_policy_policy.go index 73544e82..2d28a1bd 100644 --- a/internal/provider/resource_sdwan_application_priority_traffic_policy_policy.go +++ b/internal/provider/resource_sdwan_application_priority_traffic_policy_policy.go @@ -96,7 +96,7 @@ func (r *ApplicationPriorityTrafficPolicyProfileParcelResource) Schema(ctx conte stringvalidator.OneOf("drop", "accept"), }, }, - "vpn": schema.SetAttribute{ + "vpns": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("").String, ElementType: types.StringType, Required: true, @@ -194,7 +194,7 @@ func (r *ApplicationPriorityTrafficPolicyProfileParcelResource) Schema(ctx conte MarkdownDescription: helpers.NewAttributeDescription("Packet Length").String, Optional: true, }, - "protocol": schema.SetAttribute{ + "protocols": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("protocol (0-255) range or individual number separated by space").String, ElementType: types.StringType, Optional: true, @@ -223,15 +223,15 @@ func (r *ApplicationPriorityTrafficPolicyProfileParcelResource) Schema(ctx conte stringvalidator.RegexMatches(regexp.MustCompile(`[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`), ""), }, }, - "source_ipv4": schema.StringAttribute{ + "source_ipv4_prefix": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Source Data IP Prefix").String, Optional: true, }, - "source_ipv6": schema.StringAttribute{ + "source_ipv6_prefix": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Source Data IP Prefix").String, Optional: true, }, - "source_port": schema.SetAttribute{ + "source_ports": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Source Port (0-65535) range or individual number separated by space").String, ElementType: types.StringType, Optional: true, @@ -250,15 +250,15 @@ func (r *ApplicationPriorityTrafficPolicyProfileParcelResource) Schema(ctx conte stringvalidator.RegexMatches(regexp.MustCompile(`[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`), ""), }, }, - "destination_ipv4": schema.StringAttribute{ + "destination_ipv4_prefix": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Destination Data IP Prefix").String, Optional: true, }, - "destination_ipv6": schema.StringAttribute{ + "destination_ipv6_prefix": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Destination Data IP Prefix").String, Optional: true, }, - "destination_port": schema.SetAttribute{ + "destination_ports": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Destination Port (0-65535) range or individual number separated by space").String, ElementType: types.StringType, Optional: true, @@ -348,7 +348,7 @@ func (r *ApplicationPriorityTrafficPolicyProfileParcelResource) Schema(ctx conte ElementType: types.StringType, Optional: true, }, - "sets": schema.ListNestedAttribute{ + "set_parameters": schema.ListNestedAttribute{ MarkdownDescription: helpers.NewAttributeDescription("").String, Optional: true, NestedObject: schema.NestedAttributeObject{ diff --git a/internal/provider/resource_sdwan_application_priority_traffic_policy_policy_test.go b/internal/provider/resource_sdwan_application_priority_traffic_policy_policy_test.go index 5ea42b75..a0193194 100644 --- a/internal/provider/resource_sdwan_application_priority_traffic_policy_policy_test.go +++ b/internal/provider/resource_sdwan_application_priority_traffic_policy_policy_test.go @@ -94,7 +94,7 @@ func testAccSdwanApplicationPriorityTrafficPolicyProfileParcelConfig_all() strin config += ` description = "Terraform integration test"` + "\n" config += ` feature_profile_id = sdwan_application_priority_feature_profile.test.id` + "\n" config += ` default_action = "accept"` + "\n" - config += ` vpn = ["edge_basic_vpn1"]` + "\n" + config += ` vpns = ["Local_Internet_for_Guests"]` + "\n" config += ` direction = "all"` + "\n" config += ` sequences = [{` + "\n" config += ` sequence_id = 1` + "\n" @@ -105,7 +105,7 @@ func testAccSdwanApplicationPriorityTrafficPolicyProfileParcelConfig_all() strin config += ` dscp = 1` + "\n" config += ` }]` + "\n" config += ` actions = [{` + "\n" - config += ` sets = [{` + "\n" + config += ` set_parameters = [{` + "\n" config += ` }]` + "\n" config += ` }]` + "\n" config += ` }]` + "\n"