diff --git a/docs/data-sources/application_aware_routing_policy_definition.md b/docs/data-sources/application_aware_routing_policy_definition.md index 68072479..ffb2bc64 100644 --- a/docs/data-sources/application_aware_routing_policy_definition.md +++ b/docs/data-sources/application_aware_routing_policy_definition.md @@ -86,6 +86,7 @@ Read-Only: - `dns_application_list_id` (String) DNS Application list ID - `dns_application_list_version` (Number) DNS Application list version - `dscp` (Number) DSCP value +- `icmp_message` (String) ICMP Message - `plp` (String) PLP - `protocol` (String) IP Protocol, 0-255 (Single value or multiple values separated by spaces) - `source_data_prefix_list_id` (String) Source Data Prefix list ID diff --git a/docs/data-sources/ipv4_acl_policy_definition.md b/docs/data-sources/ipv4_acl_policy_definition.md index 50cd600d..5f0bea40 100644 --- a/docs/data-sources/ipv4_acl_policy_definition.md +++ b/docs/data-sources/ipv4_acl_policy_definition.md @@ -84,6 +84,7 @@ Read-Only: - `destination_ip` (String) Destination IP prefix - `destination_ports` (String) Destination ports. Single value (0-65535) or ranges separated by spaces. - `dscp` (Number) DSCP value +- `icmp_message` (String) ICMP Message - `packet_length` (Number) Packet length - `priority` (String) PLP - priority - `protocol` (String) Single value (0-255) or multiple values separated by spaces diff --git a/docs/data-sources/traffic_data_policy_definition.md b/docs/data-sources/traffic_data_policy_definition.md index 5ff2c5b5..c0a625cf 100644 --- a/docs/data-sources/traffic_data_policy_definition.md +++ b/docs/data-sources/traffic_data_policy_definition.md @@ -134,6 +134,7 @@ Read-Only: - `dns_application_list_id` (String) DNS Application list ID - `dns_application_list_version` (Number) DNS Application list version - `dscp` (Number) DSCP value +- `icmp_message` (String) ICMP Message - `packet_length` (Number) Packet length - `plp` (String) PLP - `protocol` (String) IP Protocol, 0-255 (Single value or multiple values separated by spaces) diff --git a/docs/resources/application_aware_routing_policy_definition.md b/docs/resources/application_aware_routing_policy_definition.md index d968b965..1da548ac 100644 --- a/docs/resources/application_aware_routing_policy_definition.md +++ b/docs/resources/application_aware_routing_policy_definition.md @@ -108,7 +108,7 @@ Optional: Required: - `type` (String) Type of match entry - - Choices: `appList`, `dnsAppList`, `dns`, `dscp`, `plp`, `protocol`, `sourceDataPrefixList`, `sourceIp`, `sourcePort`, `destinationDataPrefixList`, `destinationIp`, `destinationRegion`, `destinationPort`, `trafficTo` + - Choices: `appList`, `dnsAppList`, `dns`, `dscp`, `plp`, `protocol`, `sourceDataPrefixList`, `sourceIp`, `sourcePort`, `destinationDataPrefixList`, `destinationIp`, `destinationRegion`, `destinationPort`, `trafficTo`, `icmpMessage` Optional: @@ -126,6 +126,7 @@ Optional: - `dns_application_list_version` (Number) DNS Application list version - `dscp` (Number) DSCP value - Range: `0`-`63` +- `icmp_message` (String) ICMP Message - `plp` (String) PLP - Choices: `low`, `high` - `protocol` (String) IP Protocol, 0-255 (Single value or multiple values separated by spaces) diff --git a/docs/resources/custom_control_topology_policy_definition.md b/docs/resources/custom_control_topology_policy_definition.md index 6627d105..4037d393 100644 --- a/docs/resources/custom_control_topology_policy_definition.md +++ b/docs/resources/custom_control_topology_policy_definition.md @@ -53,12 +53,12 @@ resource "sdwan_custom_control_topology_policy_definition" "example" { - `description` (String) The description of the policy definition - `name` (String) The name of the policy definition -- `sequences` (Attributes List) List of sequences (see [below for nested schema](#nestedatt--sequences)) ### Optional - `default_action` (String) Default action, either `accept` or `reject` - Choices: `accept`, `reject` +- `sequences` (Attributes List) List of sequences (see [below for nested schema](#nestedatt--sequences)) ### Read-Only diff --git a/docs/resources/ipv4_acl_policy_definition.md b/docs/resources/ipv4_acl_policy_definition.md index 2894cda4..ededd3aa 100644 --- a/docs/resources/ipv4_acl_policy_definition.md +++ b/docs/resources/ipv4_acl_policy_definition.md @@ -122,7 +122,7 @@ Optional: Required: - `type` (String) Type of match entry - - Choices: `dscp`, `sourceIp`, `destinationIp`, `class`, `packetLength`, `plp`, `sourcePort`, `destinationPort`, `sourceDataPrefixList`, `destinationDataPrefixList`, `protocol`, `tcp` + - Choices: `dscp`, `sourceIp`, `destinationIp`, `class`, `packetLength`, `plp`, `sourcePort`, `destinationPort`, `sourceDataPrefixList`, `destinationDataPrefixList`, `protocol`, `tcp`, `icmpMessage` Optional: @@ -134,6 +134,7 @@ Optional: - `destination_ports` (String) Destination ports. Single value (0-65535) or ranges separated by spaces. - `dscp` (Number) DSCP value - Range: `0`-`63` +- `icmp_message` (String) ICMP Message - `packet_length` (Number) Packet length - Range: `0`-`65535` - `priority` (String) PLP - priority diff --git a/docs/resources/traffic_data_policy_definition.md b/docs/resources/traffic_data_policy_definition.md index c955be8c..2ec92046 100644 --- a/docs/resources/traffic_data_policy_definition.md +++ b/docs/resources/traffic_data_policy_definition.md @@ -183,7 +183,7 @@ Optional: Required: - `type` (String) Type of match entry - - Choices: `appList`, `dnsAppList`, `dns`, `dscp`, `packetLength`, `plp`, `protocol`, `sourceDataPrefixList`, `sourceIp`, `sourcePort`, `destinationDataPrefixList`, `destinationIp`, `destinationRegion`, `destinationPort`, `tcp`, `trafficTo` + - Choices: `appList`, `dnsAppList`, `dns`, `dscp`, `packetLength`, `plp`, `protocol`, `sourceDataPrefixList`, `sourceIp`, `sourcePort`, `destinationDataPrefixList`, `destinationIp`, `destinationRegion`, `destinationPort`, `tcp`, `trafficTo`, `icmpMessage` Optional: @@ -201,6 +201,7 @@ Optional: - `dns_application_list_version` (Number) DNS Application list version - `dscp` (Number) DSCP value - Range: `0`-`63` +- `icmp_message` (String) ICMP Message - `packet_length` (Number) Packet length - Range: `0`-`65535` - `plp` (String) PLP diff --git a/gen/definitions/generic/application_aware_routing_policy_definition.yaml b/gen/definitions/generic/application_aware_routing_policy_definition.yaml index 70ea1147..cfa84eaa 100644 --- a/gen/definitions/generic/application_aware_routing_policy_definition.yaml +++ b/gen/definitions/generic/application_aware_routing_policy_definition.yaml @@ -77,6 +77,7 @@ attributes: destinationRegion, destinationPort, trafficTo, + icmpMessage ] description: Type of match entry example: appList @@ -108,6 +109,15 @@ attributes: type: Version description: DNS Application list version exclude_test: true + - model_name: value + tf_name: icmp_message + conditional_attribute: + name: type + value: icmpMessage + type: String + description: ICMP Message + exclude_test: true + example: "echo echo-reply" - model_name: value tf_name: dns conditional_attribute: diff --git a/gen/definitions/generic/custom_control_topology_policy_definition.yaml b/gen/definitions/generic/custom_control_topology_policy_definition.yaml index 9fb8000d..164a38b4 100644 --- a/gen/definitions/generic/custom_control_topology_policy_definition.yaml +++ b/gen/definitions/generic/custom_control_topology_policy_definition.yaml @@ -31,7 +31,6 @@ attributes: - model_name: sequences tf_name: sequences type: List - mandatory: true description: List of sequences attributes: - model_name: sequenceId diff --git a/gen/definitions/generic/ipv4_acl_policy_definition.yaml b/gen/definitions/generic/ipv4_acl_policy_definition.yaml index 64b1fd08..3d35962a 100644 --- a/gen/definitions/generic/ipv4_acl_policy_definition.yaml +++ b/gen/definitions/generic/ipv4_acl_policy_definition.yaml @@ -84,6 +84,7 @@ attributes: destinationDataPrefixList, protocol, tcp, + icmpMessage ] description: Type of match entry example: dscp @@ -107,6 +108,15 @@ attributes: description: Source IP prefix exclude_test: true example: 10.0.0.0/8 + - model_name: value + tf_name: icmp_message + conditional_attribute: + name: type + value: icmpMessage + type: String + description: ICMP Message + exclude_test: true + example: "echo echo-reply" - model_name: value tf_name: destination_ip conditional_attribute: diff --git a/gen/definitions/generic/traffic_data_policy_definition.yaml b/gen/definitions/generic/traffic_data_policy_definition.yaml index f4066165..84e6cc78 100644 --- a/gen/definitions/generic/traffic_data_policy_definition.yaml +++ b/gen/definitions/generic/traffic_data_policy_definition.yaml @@ -97,6 +97,7 @@ attributes: destinationPort, tcp, trafficTo, + icmpMessage, ] description: Type of match entry example: appList @@ -128,6 +129,15 @@ attributes: type: Version description: DNS Application list version exclude_test: true + - model_name: value + tf_name: icmp_message + conditional_attribute: + name: type + value: icmpMessage + type: String + description: ICMP Message + exclude_test: true + example: "echo echo-reply" - model_name: value tf_name: dns conditional_attribute: diff --git a/internal/provider/data_source_sdwan_application_aware_routing_policy_definition.go b/internal/provider/data_source_sdwan_application_aware_routing_policy_definition.go index 60cf127b..7c72159a 100644 --- a/internal/provider/data_source_sdwan_application_aware_routing_policy_definition.go +++ b/internal/provider/data_source_sdwan_application_aware_routing_policy_definition.go @@ -120,6 +120,10 @@ func (d *ApplicationAwareRoutingPolicyDefinitionDataSource) Schema(ctx context.C MarkdownDescription: "DNS Application list version", Computed: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: "ICMP Message", + Computed: true, + }, "dns": schema.StringAttribute{ MarkdownDescription: "DNS request or response", Computed: true, diff --git a/internal/provider/data_source_sdwan_ipv4_acl_policy_definition.go b/internal/provider/data_source_sdwan_ipv4_acl_policy_definition.go index 8425eccb..5b99f536 100644 --- a/internal/provider/data_source_sdwan_ipv4_acl_policy_definition.go +++ b/internal/provider/data_source_sdwan_ipv4_acl_policy_definition.go @@ -116,6 +116,10 @@ func (d *IPv4ACLPolicyDefinitionDataSource) Schema(ctx context.Context, req data MarkdownDescription: "Source IP prefix", Computed: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: "ICMP Message", + Computed: true, + }, "destination_ip": schema.StringAttribute{ MarkdownDescription: "Destination IP prefix", Computed: true, diff --git a/internal/provider/data_source_sdwan_traffic_data_policy_definition.go b/internal/provider/data_source_sdwan_traffic_data_policy_definition.go index a07d2cdd..9a9efec4 100644 --- a/internal/provider/data_source_sdwan_traffic_data_policy_definition.go +++ b/internal/provider/data_source_sdwan_traffic_data_policy_definition.go @@ -132,6 +132,10 @@ func (d *TrafficDataPolicyDefinitionDataSource) Schema(ctx context.Context, req MarkdownDescription: "DNS Application list version", Computed: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: "ICMP Message", + Computed: true, + }, "dns": schema.StringAttribute{ MarkdownDescription: "DNS request or response", Computed: true, diff --git a/internal/provider/model_sdwan_application_aware_routing_policy_definition.go b/internal/provider/model_sdwan_application_aware_routing_policy_definition.go index 90fbc7b7..aa23e319 100644 --- a/internal/provider/model_sdwan_application_aware_routing_policy_definition.go +++ b/internal/provider/model_sdwan_application_aware_routing_policy_definition.go @@ -53,6 +53,7 @@ type ApplicationAwareRoutingPolicyDefinitionSequencesMatchEntries struct { ApplicationListVersion types.Int64 `tfsdk:"application_list_version"` DnsApplicationListId types.String `tfsdk:"dns_application_list_id"` DnsApplicationListVersion types.Int64 `tfsdk:"dns_application_list_version"` + IcmpMessage types.String `tfsdk:"icmp_message"` Dns types.String `tfsdk:"dns"` Dscp types.Int64 `tfsdk:"dscp"` Plp types.String `tfsdk:"plp"` @@ -136,6 +137,9 @@ func (data ApplicationAwareRoutingPolicyDefinition) toBody(ctx context.Context) if !childItem.DnsApplicationListId.IsNull() && childItem.Type.ValueString() == "dnsAppList" { itemChildBody, _ = sjson.Set(itemChildBody, "ref", childItem.DnsApplicationListId.ValueString()) } + if !childItem.IcmpMessage.IsNull() && childItem.Type.ValueString() == "icmpMessage" { + itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.IcmpMessage.ValueString()) + } if !childItem.Dns.IsNull() && childItem.Type.ValueString() == "dns" { itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.Dns.ValueString()) } @@ -279,6 +283,11 @@ func (data *ApplicationAwareRoutingPolicyDefinition) fromBody(ctx context.Contex } else { cItem.DnsApplicationListId = types.StringNull() } + if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "icmpMessage" { + cItem.IcmpMessage = types.StringValue(ccValue.String()) + } else { + cItem.IcmpMessage = types.StringNull() + } if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "dns" { cItem.Dns = types.StringValue(ccValue.String()) } else { @@ -468,6 +477,9 @@ func (data *ApplicationAwareRoutingPolicyDefinition) hasChanges(ctx context.Cont if !data.Sequences[i].MatchEntries[ii].DnsApplicationListId.Equal(state.Sequences[i].MatchEntries[ii].DnsApplicationListId) { hasChanges = true } + if !data.Sequences[i].MatchEntries[ii].IcmpMessage.Equal(state.Sequences[i].MatchEntries[ii].IcmpMessage) { + hasChanges = true + } if !data.Sequences[i].MatchEntries[ii].Dns.Equal(state.Sequences[i].MatchEntries[ii].Dns) { hasChanges = true } diff --git a/internal/provider/model_sdwan_ipv4_acl_policy_definition.go b/internal/provider/model_sdwan_ipv4_acl_policy_definition.go index c6c6ce9f..800fe7c5 100644 --- a/internal/provider/model_sdwan_ipv4_acl_policy_definition.go +++ b/internal/provider/model_sdwan_ipv4_acl_policy_definition.go @@ -52,6 +52,7 @@ type IPv4ACLPolicyDefinitionSequencesMatchEntries struct { Type types.String `tfsdk:"type"` Dscp types.Int64 `tfsdk:"dscp"` SourceIp types.String `tfsdk:"source_ip"` + IcmpMessage types.String `tfsdk:"icmp_message"` DestinationIp types.String `tfsdk:"destination_ip"` ClassMapId types.String `tfsdk:"class_map_id"` ClassMapVersion types.Int64 `tfsdk:"class_map_version"` @@ -138,6 +139,9 @@ func (data IPv4ACLPolicyDefinition) toBody(ctx context.Context) string { if !childItem.SourceIp.IsNull() && childItem.Type.ValueString() == "sourceIp" { itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.SourceIp.ValueString()) } + if !childItem.IcmpMessage.IsNull() && childItem.Type.ValueString() == "icmpMessage" { + itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.IcmpMessage.ValueString()) + } if !childItem.DestinationIp.IsNull() && childItem.Type.ValueString() == "destinationIp" { itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.DestinationIp.ValueString()) } @@ -278,6 +282,11 @@ func (data *IPv4ACLPolicyDefinition) fromBody(ctx context.Context, res gjson.Res } else { cItem.SourceIp = types.StringNull() } + if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "icmpMessage" { + cItem.IcmpMessage = types.StringValue(ccValue.String()) + } else { + cItem.IcmpMessage = types.StringNull() + } if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "destinationIp" { cItem.DestinationIp = types.StringValue(ccValue.String()) } else { @@ -458,6 +467,9 @@ func (data *IPv4ACLPolicyDefinition) hasChanges(ctx context.Context, state *IPv4 if !data.Sequences[i].MatchEntries[ii].SourceIp.Equal(state.Sequences[i].MatchEntries[ii].SourceIp) { hasChanges = true } + if !data.Sequences[i].MatchEntries[ii].IcmpMessage.Equal(state.Sequences[i].MatchEntries[ii].IcmpMessage) { + hasChanges = true + } if !data.Sequences[i].MatchEntries[ii].DestinationIp.Equal(state.Sequences[i].MatchEntries[ii].DestinationIp) { hasChanges = true } diff --git a/internal/provider/model_sdwan_traffic_data_policy_definition.go b/internal/provider/model_sdwan_traffic_data_policy_definition.go index a338ba6d..b03d8065 100644 --- a/internal/provider/model_sdwan_traffic_data_policy_definition.go +++ b/internal/provider/model_sdwan_traffic_data_policy_definition.go @@ -56,6 +56,7 @@ type TrafficDataPolicyDefinitionSequencesMatchEntries struct { ApplicationListVersion types.Int64 `tfsdk:"application_list_version"` DnsApplicationListId types.String `tfsdk:"dns_application_list_id"` DnsApplicationListVersion types.Int64 `tfsdk:"dns_application_list_version"` + IcmpMessage types.String `tfsdk:"icmp_message"` Dns types.String `tfsdk:"dns"` Dscp types.Int64 `tfsdk:"dscp"` PacketLength types.Int64 `tfsdk:"packet_length"` @@ -187,6 +188,9 @@ func (data TrafficDataPolicyDefinition) toBody(ctx context.Context) string { if !childItem.DnsApplicationListId.IsNull() && childItem.Type.ValueString() == "dnsAppList" { itemChildBody, _ = sjson.Set(itemChildBody, "ref", childItem.DnsApplicationListId.ValueString()) } + if !childItem.IcmpMessage.IsNull() && childItem.Type.ValueString() == "icmpMessage" { + itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.IcmpMessage.ValueString()) + } if !childItem.Dns.IsNull() && childItem.Type.ValueString() == "dns" { itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.Dns.ValueString()) } @@ -485,6 +489,11 @@ func (data *TrafficDataPolicyDefinition) fromBody(ctx context.Context, res gjson } else { cItem.DnsApplicationListId = types.StringNull() } + if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "icmpMessage" { + cItem.IcmpMessage = types.StringValue(ccValue.String()) + } else { + cItem.IcmpMessage = types.StringNull() + } if ccValue := cv.Get("value"); ccValue.Exists() && cItem.Type.ValueString() == "dns" { cItem.Dns = types.StringValue(ccValue.String()) } else { @@ -902,6 +911,9 @@ func (data *TrafficDataPolicyDefinition) hasChanges(ctx context.Context, state * if !data.Sequences[i].MatchEntries[ii].DnsApplicationListId.Equal(state.Sequences[i].MatchEntries[ii].DnsApplicationListId) { hasChanges = true } + if !data.Sequences[i].MatchEntries[ii].IcmpMessage.Equal(state.Sequences[i].MatchEntries[ii].IcmpMessage) { + hasChanges = true + } if !data.Sequences[i].MatchEntries[ii].Dns.Equal(state.Sequences[i].MatchEntries[ii].Dns) { hasChanges = true } diff --git a/internal/provider/resource_sdwan_application_aware_routing_policy_definition.go b/internal/provider/resource_sdwan_application_aware_routing_policy_definition.go index 7b8befc8..cb1358a3 100644 --- a/internal/provider/resource_sdwan_application_aware_routing_policy_definition.go +++ b/internal/provider/resource_sdwan_application_aware_routing_policy_definition.go @@ -118,10 +118,10 @@ func (r *ApplicationAwareRoutingPolicyDefinitionResource) Schema(ctx context.Con NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("appList", "dnsAppList", "dns", "dscp", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "trafficTo").String, + MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("appList", "dnsAppList", "dns", "dscp", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "trafficTo", "icmpMessage").String, Required: true, Validators: []validator.String{ - stringvalidator.OneOf("appList", "dnsAppList", "dns", "dscp", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "trafficTo"), + stringvalidator.OneOf("appList", "dnsAppList", "dns", "dscp", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "trafficTo", "icmpMessage"), }, }, "application_list_id": schema.StringAttribute{ @@ -140,6 +140,10 @@ func (r *ApplicationAwareRoutingPolicyDefinitionResource) Schema(ctx context.Con MarkdownDescription: helpers.NewAttributeDescription("DNS Application list version").String, Optional: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("ICMP Message").String, + Optional: true, + }, "dns": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("DNS request or response").AddStringEnumDescription("request", "response").String, Optional: true, diff --git a/internal/provider/resource_sdwan_custom_control_topology_policy_definition.go b/internal/provider/resource_sdwan_custom_control_topology_policy_definition.go index d337b31a..a52fa95c 100644 --- a/internal/provider/resource_sdwan_custom_control_topology_policy_definition.go +++ b/internal/provider/resource_sdwan_custom_control_topology_policy_definition.go @@ -101,7 +101,7 @@ func (r *CustomControlTopologyPolicyDefinitionResource) Schema(ctx context.Conte }, "sequences": schema.ListNestedAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of sequences").String, - Required: true, + Optional: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "id": schema.Int64Attribute{ diff --git a/internal/provider/resource_sdwan_ipv4_acl_policy_definition.go b/internal/provider/resource_sdwan_ipv4_acl_policy_definition.go index 65faaa3b..8e81572b 100644 --- a/internal/provider/resource_sdwan_ipv4_acl_policy_definition.go +++ b/internal/provider/resource_sdwan_ipv4_acl_policy_definition.go @@ -128,10 +128,10 @@ func (r *IPv4ACLPolicyDefinitionResource) Schema(ctx context.Context, req resour NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("dscp", "sourceIp", "destinationIp", "class", "packetLength", "plp", "sourcePort", "destinationPort", "sourceDataPrefixList", "destinationDataPrefixList", "protocol", "tcp").String, + MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("dscp", "sourceIp", "destinationIp", "class", "packetLength", "plp", "sourcePort", "destinationPort", "sourceDataPrefixList", "destinationDataPrefixList", "protocol", "tcp", "icmpMessage").String, Required: true, Validators: []validator.String{ - stringvalidator.OneOf("dscp", "sourceIp", "destinationIp", "class", "packetLength", "plp", "sourcePort", "destinationPort", "sourceDataPrefixList", "destinationDataPrefixList", "protocol", "tcp"), + stringvalidator.OneOf("dscp", "sourceIp", "destinationIp", "class", "packetLength", "plp", "sourcePort", "destinationPort", "sourceDataPrefixList", "destinationDataPrefixList", "protocol", "tcp", "icmpMessage"), }, }, "dscp": schema.Int64Attribute{ @@ -145,6 +145,10 @@ func (r *IPv4ACLPolicyDefinitionResource) Schema(ctx context.Context, req resour MarkdownDescription: helpers.NewAttributeDescription("Source IP prefix").String, Optional: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("ICMP Message").String, + Optional: true, + }, "destination_ip": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Destination IP prefix").String, Optional: true, diff --git a/internal/provider/resource_sdwan_traffic_data_policy_definition.go b/internal/provider/resource_sdwan_traffic_data_policy_definition.go index c86c3dfb..9936eee4 100644 --- a/internal/provider/resource_sdwan_traffic_data_policy_definition.go +++ b/internal/provider/resource_sdwan_traffic_data_policy_definition.go @@ -139,10 +139,10 @@ func (r *TrafficDataPolicyDefinitionResource) Schema(ctx context.Context, req re NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("appList", "dnsAppList", "dns", "dscp", "packetLength", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "tcp", "trafficTo").String, + MarkdownDescription: helpers.NewAttributeDescription("Type of match entry").AddStringEnumDescription("appList", "dnsAppList", "dns", "dscp", "packetLength", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "tcp", "trafficTo", "icmpMessage").String, Required: true, Validators: []validator.String{ - stringvalidator.OneOf("appList", "dnsAppList", "dns", "dscp", "packetLength", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "tcp", "trafficTo"), + stringvalidator.OneOf("appList", "dnsAppList", "dns", "dscp", "packetLength", "plp", "protocol", "sourceDataPrefixList", "sourceIp", "sourcePort", "destinationDataPrefixList", "destinationIp", "destinationRegion", "destinationPort", "tcp", "trafficTo", "icmpMessage"), }, }, "application_list_id": schema.StringAttribute{ @@ -161,6 +161,10 @@ func (r *TrafficDataPolicyDefinitionResource) Schema(ctx context.Context, req re MarkdownDescription: helpers.NewAttributeDescription("DNS Application list version").String, Optional: true, }, + "icmp_message": schema.StringAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("ICMP Message").String, + Optional: true, + }, "dns": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("DNS request or response").AddStringEnumDescription("request", "response").String, Optional: true,