diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e5a01b..ce471105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - BREAKING CHANGE: Rename `sla_class_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `sla_class_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `preferred_color_group_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_traffic_data_policy_definition` resource to `preferred_color_group_list_id` +- Fix issue, where NAT IPv4 and IPv6 is always configured on `sdwan_transport_wan_vpn_interface_ethernet_feature`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/485) - Add missing options under `unsupported_features` attribute of `sdwan_configuration_group`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/478) - Add `sdwan_policy_group` resource and data source - Adds `enhanced_app_aware_routing` support to the `sdwan_cisco_system_feature_template` resource and data source diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 311164b0..13308638 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -13,6 +13,7 @@ description: |- - BREAKING CHANGE: Rename `sla_class_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `sla_class_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `preferred_color_group_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_traffic_data_policy_definition` resource to `preferred_color_group_list_id` +- Fix issue, where NAT IPv4 and IPv6 is always configured on `sdwan_transport_wan_vpn_interface_ethernet_feature`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/485) - Add missing options under `unsupported_features` attribute of `sdwan_configuration_group`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/478) - Add `sdwan_policy_group` resource and data source - Adds `enhanced_app_aware_routing` support to the `sdwan_cisco_system_feature_template` resource and data source diff --git a/docs/resources/transport_wan_vpn_interface_ethernet_feature.md b/docs/resources/transport_wan_vpn_interface_ethernet_feature.md index 19302a68..746a5ff7 100644 --- a/docs/resources/transport_wan_vpn_interface_ethernet_feature.md +++ b/docs/resources/transport_wan_vpn_interface_ethernet_feature.md @@ -228,9 +228,9 @@ resource "sdwan_transport_wan_vpn_interface_ethernet_feature" "example" { - `media_type` (String) Media type - Choices: `auto-select`, `rj45`, `sfp` - `media_type_variable` (String) Variable name -- `nat64` (Boolean) NAT64 on this interface +- `nat64` (Boolean) NAT64 on this interface, Attribute conditional on `nat_ipv6` being equal to `true` - Default value: `false` -- `nat66` (Boolean) NAT66 on this interface +- `nat66` (Boolean) NAT66 on this interface, Attribute conditional on `nat_ipv6` being equal to `true` - Default value: `false` - `nat_ipv4` (Boolean) enable Network Address Translation on this interface - Default value: `false` @@ -238,31 +238,31 @@ resource "sdwan_transport_wan_vpn_interface_ethernet_feature" "example" { - `nat_ipv6` (Boolean) enable Network Address Translation ipv6 on this interface - Default value: `false` - `nat_ipv6_variable` (String) Variable name -- `nat_loopback` (String) NAT Inside Source Loopback Interface -- `nat_loopback_variable` (String) Variable name -- `nat_overload` (Boolean) NAT Overload +- `nat_loopback` (String) NAT Inside Source Loopback Interface, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_loopback_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_overload` (Boolean) NAT Overload, Attribute conditional on `nat_ipv4` being equal to `true` - Default value: `true` -- `nat_overload_variable` (String) Variable name -- `nat_prefix_length` (Number) NAT Pool Prefix Length +- `nat_overload_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_prefix_length` (Number) NAT Pool Prefix Length, Attribute conditional on `nat_ipv4` being equal to `true` - Range: `1`-`32` -- `nat_prefix_length_variable` (String) Variable name -- `nat_range_end` (String) NAT Pool Range End -- `nat_range_end_variable` (String) Variable name -- `nat_range_start` (String) NAT Pool Range Start -- `nat_range_start_variable` (String) Variable name -- `nat_tcp_timeout` (Number) Set NAT TCP session timeout, in minutes +- `nat_prefix_length_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_range_end` (String) NAT Pool Range End, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_range_end_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_range_start` (String) NAT Pool Range Start, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_range_start_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_tcp_timeout` (Number) Set NAT TCP session timeout, in minutes, Attribute conditional on `nat_ipv4` being equal to `true` - Range: `1`-`8947` - Default value: `60` -- `nat_tcp_timeout_variable` (String) Variable name -- `nat_type` (String) NAT Type +- `nat_tcp_timeout_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_type` (String) NAT Type, Attribute conditional on `nat_ipv4` being equal to `true` - Choices: `interface`, `pool`, `loopback` - Default value: `interface` -- `nat_type_variable` (String) Variable name -- `nat_udp_timeout` (Number) Set NAT UDP session timeout, in minutes +- `nat_type_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `nat_udp_timeout` (Number) Set NAT UDP session timeout, in minutes, Attribute conditional on `nat_ipv4` being equal to `true` - Range: `1`-`8947` - Default value: `1` -- `nat_udp_timeout_variable` (String) Variable name -- `new_static_nats` (Attributes List) static NAT (see [below for nested schema](#nestedatt--new_static_nats)) +- `nat_udp_timeout_variable` (String) Variable name, Attribute conditional on `nat_ipv4` being equal to `true` +- `new_static_nats` (Attributes List) static NAT, Attribute conditional on `nat_ipv4` being equal to `true` (see [below for nested schema](#nestedatt--new_static_nats)) - `per_tunnel_qos` (Boolean) Per-tunnel Qos, Attribute conditional on `tunnel_interface` being equal to `true` - Default value: `false` - `per_tunnel_qos_variable` (String) Variable name, Attribute conditional on `tunnel_interface` being equal to `true` @@ -304,7 +304,7 @@ resource "sdwan_transport_wan_vpn_interface_ethernet_feature" "example" { - `speed` (String) Set interface speed - Choices: `10`, `100`, `1000`, `2500`, `10000` - `speed_variable` (String) Variable name -- `static_nat66` (Attributes List) static NAT66 (see [below for nested schema](#nestedatt--static_nat66)) +- `static_nat66` (Attributes List) static NAT66, Attribute conditional on `nat_ipv6` being equal to `true` (see [below for nested schema](#nestedatt--static_nat66)) - `tcp_mss` (Number) TCP MSS on SYN packets, in bytes - Range: `500`-`1460` - `tcp_mss_variable` (String) Variable name diff --git a/gen/definitions/profile_parcels/transport_wan_vpn_interface_ethernet.yaml b/gen/definitions/profile_parcels/transport_wan_vpn_interface_ethernet.yaml index ef8bdb66..83229428 100644 --- a/gen/definitions/profile_parcels/transport_wan_vpn_interface_ethernet.yaml +++ b/gen/definitions/profile_parcels/transport_wan_vpn_interface_ethernet.yaml @@ -419,12 +419,20 @@ attributes: - model_name: natType tf_name: nat_type data_path: [natAttributesIpv4] - example: interface + example: interface + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool - model_name: rangeStart tf_name: nat_range_start data_path: [natAttributesIpv4, natPool] exclude_test: true exclude_null: true + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool # conditional_attribute: # name: natType # value: pool @@ -434,6 +442,10 @@ attributes: data_path: [natAttributesIpv4, natPool] exclude_test: true exclude_null: true + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool # conditional_attribute: # name: natType # value: pool @@ -443,6 +455,10 @@ attributes: data_path: [natAttributesIpv4, natPool] exclude_test: true exclude_null: true + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool # conditional_attribute: # name: natType # value: pool @@ -452,6 +468,10 @@ attributes: data_path: [natAttributesIpv4, natPool] exclude_test: true exclude_null: true + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool # conditional_attribute: # name: natType # value: pool @@ -461,6 +481,10 @@ attributes: data_path: [natAttributesIpv4] exclude_test: true exclude_null: true + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool # conditional_attribute: # name: natType # value: loopback @@ -469,13 +493,25 @@ attributes: tf_name: nat_udp_timeout data_path: [natAttributesIpv4] example: 1 + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool - model_name: tcpTimeout tf_name: nat_tcp_timeout data_path: [natAttributesIpv4] example: 60 + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool - model_name: newStaticNat tf_name: new_static_nats data_path: [natAttributesIpv4] + conditional_attribute: + name: nat_ipv4 + value: true + type: Bool attributes: - model_name: sourceIp id: true @@ -496,13 +532,25 @@ attributes: data_path: [natAttributesIpv6] exclude_null: true example: false + conditional_attribute: + name: nat_ipv6 + value: true + type: Bool - model_name: nat66 data_path: [natAttributesIpv6] exclude_null: true example: true + conditional_attribute: + name: nat_ipv6 + value: true + type: Bool - model_name: staticNat66 data_path: [natAttributesIpv6] exclude_null: true + conditional_attribute: + name: nat_ipv6 + value: true + type: Bool attributes: - model_name: sourcePrefix id: true diff --git a/internal/provider/model_sdwan_transport_wan_vpn_interface_ethernet_feature.go b/internal/provider/model_sdwan_transport_wan_vpn_interface_ethernet_feature.go index d20c688f..4d51f711 100644 --- a/internal/provider/model_sdwan_transport_wan_vpn_interface_ethernet_feature.go +++ b/internal/provider/model_sdwan_transport_wan_vpn_interface_ethernet_feature.go @@ -1295,65 +1295,65 @@ func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context, current } if !data.NatTypeVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.value", data.NatTypeVariable.ValueString()) } } else if data.NatType.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.optionType", "default") body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.value", "interface") } } else { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.natType.value", data.NatType.ValueString()) } } if !data.NatRangeStartVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeStart.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeStart.value", data.NatRangeStartVariable.ValueString()) } } else if !data.NatRangeStart.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeStart.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeStart.value", data.NatRangeStart.ValueString()) } } if !data.NatRangeEndVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeEnd.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeEnd.value", data.NatRangeEndVariable.ValueString()) } } else if !data.NatRangeEnd.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeEnd.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.rangeEnd.value", data.NatRangeEnd.ValueString()) } } if !data.NatPrefixLengthVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.prefixLength.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.prefixLength.value", data.NatPrefixLengthVariable.ValueString()) } } else if !data.NatPrefixLength.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.prefixLength.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.prefixLength.value", data.NatPrefixLength.ValueInt64()) } } if !data.NatOverloadVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.overload.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.overload.value", data.NatOverloadVariable.ValueString()) } } else if !data.NatOverload.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.overload.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.natPool.overload.value", data.NatOverload.ValueBool()) } @@ -1364,51 +1364,51 @@ func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context, current natLookBackRef = "natLoopback" } if !data.NatLoopbackVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4."+natLookBackRef+".optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4."+natLookBackRef+".value", data.NatLoopbackVariable.ValueString()) } } else if !data.NatLoopback.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4."+natLookBackRef+".optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4."+natLookBackRef+".value", data.NatLoopback.ValueString()) } } if !data.NatUdpTimeoutVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.value", data.NatUdpTimeoutVariable.ValueString()) } } else if data.NatUdpTimeout.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.optionType", "default") body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.value", 1) } } else { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.udpTimeout.value", data.NatUdpTimeout.ValueInt64()) } } if !data.NatTcpTimeoutVariable.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.optionType", "variable") body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.value", data.NatTcpTimeoutVariable.ValueString()) } } else if data.NatTcpTimeout.IsNull() { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.optionType", "default") body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.value", 60) } } else { - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv4.tcpTimeout.value", data.NatTcpTimeout.ValueInt64()) } } - if true { + if true && data.NatIpv4.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv4.newStaticNat", []interface{}{}) for _, item := range data.NewStaticNats { itemBody := "" @@ -1485,18 +1485,18 @@ func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context, current } } if !data.Nat64.IsNull() { - if true { + if true && data.NatIpv6.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv6.nat64.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv6.nat64.value", data.Nat64.ValueBool()) } } if !data.Nat66.IsNull() { - if true { + if true && data.NatIpv6.ValueBool() == true { body, _ = sjson.Set(body, path+"natAttributesIpv6.nat66.optionType", "global") body, _ = sjson.Set(body, path+"natAttributesIpv6.nat66.value", data.Nat66.ValueBool()) } } - if true { + if true && data.NatIpv6.ValueBool() == true { for _, item := range data.StaticNat66 { itemBody := "" @@ -2683,6 +2683,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatType = types.StringValue(va.String()) } + data.NatIpv4 = types.BoolValue(true) } data.NatRangeStart = types.StringNull() data.NatRangeStartVariable = types.StringNull() @@ -2693,6 +2694,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatRangeStart = types.StringValue(va.String()) } + data.NatIpv4 = types.BoolValue(true) } data.NatRangeEnd = types.StringNull() data.NatRangeEndVariable = types.StringNull() @@ -2703,6 +2705,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatRangeEnd = types.StringValue(va.String()) } + data.NatIpv4 = types.BoolValue(true) } data.NatPrefixLength = types.Int64Null() data.NatPrefixLengthVariable = types.StringNull() @@ -2713,6 +2716,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatPrefixLength = types.Int64Value(va.Int()) } + data.NatIpv4 = types.BoolValue(true) } data.NatOverload = types.BoolNull() data.NatOverloadVariable = types.StringNull() @@ -2723,6 +2727,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatOverload = types.BoolValue(va.Bool()) } + data.NatIpv4 = types.BoolValue(true) } data.NatLoopback = types.StringNull() data.NatLoopbackVariable = types.StringNull() @@ -2737,6 +2742,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatLoopback = types.StringValue(va.String()) } + data.NatIpv4 = types.BoolValue(true) } data.NatUdpTimeout = types.Int64Null() data.NatUdpTimeoutVariable = types.StringNull() @@ -2747,6 +2753,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatUdpTimeout = types.Int64Value(va.Int()) } + data.NatIpv4 = types.BoolValue(true) } data.NatTcpTimeout = types.Int64Null() data.NatTcpTimeoutVariable = types.StringNull() @@ -2757,6 +2764,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res } else if t.String() == "global" { data.NatTcpTimeout = types.Int64Value(va.Int()) } + data.NatIpv4 = types.BoolValue(true) } if value := res.Get(path + "natAttributesIpv4.newStaticNat"); value.Exists() && len(value.Array()) > 0 { data.NewStaticNats = make([]TransportWANVPNInterfaceEthernetNewStaticNats, 0) @@ -2803,6 +2811,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res data.NewStaticNats = append(data.NewStaticNats, item) return true }) + data.NatIpv4 = types.BoolValue(true) } data.NatIpv6 = types.BoolNull() data.NatIpv6Variable = types.StringNull() @@ -2821,6 +2830,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res if t.String() == "global" { data.Nat64 = types.BoolValue(va.Bool()) } + data.NatIpv6 = types.BoolValue(true) } data.Nat66 = types.BoolNull() @@ -2829,6 +2839,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res if t.String() == "global" { data.Nat66 = types.BoolValue(va.Bool()) } + data.NatIpv6 = types.BoolValue(true) } if value := res.Get(path + "natAttributesIpv6.staticNat66"); value.Exists() && len(value.Array()) > 0 { data.StaticNat66 = make([]TransportWANVPNInterfaceEthernetStaticNat66, 0) @@ -2867,6 +2878,7 @@ func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res data.StaticNat66 = append(data.StaticNat66, item) return true }) + data.NatIpv6 = types.BoolValue(true) } data.QosAdaptive = types.BoolNull() diff --git a/internal/provider/resource_sdwan_transport_wan_vpn_interface_ethernet_feature.go b/internal/provider/resource_sdwan_transport_wan_vpn_interface_ethernet_feature.go index 776f4dfd..b1c91995 100644 --- a/internal/provider/resource_sdwan_transport_wan_vpn_interface_ethernet_feature.go +++ b/internal/provider/resource_sdwan_transport_wan_vpn_interface_ethernet_feature.go @@ -690,86 +690,86 @@ func (r *TransportWANVPNInterfaceEthernetProfileParcelResource) Schema(ctx conte Optional: true, }, "nat_type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Type").AddStringEnumDescription("interface", "pool", "loopback").AddDefaultValueDescription("interface").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Type, Attribute conditional on `nat_ipv4` being equal to `true`").AddStringEnumDescription("interface", "pool", "loopback").AddDefaultValueDescription("interface").String, Optional: true, Validators: []validator.String{ stringvalidator.OneOf("interface", "pool", "loopback"), }, }, "nat_type_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_range_start": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Range Start").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Range Start, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_range_start_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_range_end": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Range End").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Range End, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_range_end_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_prefix_length": schema.Int64Attribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Prefix Length").AddIntegerRangeDescription(1, 32).String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Pool Prefix Length, Attribute conditional on `nat_ipv4` being equal to `true`").AddIntegerRangeDescription(1, 32).String, Optional: true, Validators: []validator.Int64{ int64validator.Between(1, 32), }, }, "nat_prefix_length_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_overload": schema.BoolAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Overload").AddDefaultValueDescription("true").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Overload, Attribute conditional on `nat_ipv4` being equal to `true`").AddDefaultValueDescription("true").String, Optional: true, }, "nat_overload_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_loopback": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT Inside Source Loopback Interface").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT Inside Source Loopback Interface, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, Validators: []validator.String{ stringvalidator.LengthBetween(1, 32), }, }, "nat_loopback_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_udp_timeout": schema.Int64Attribute{ - MarkdownDescription: helpers.NewAttributeDescription("Set NAT UDP session timeout, in minutes").AddIntegerRangeDescription(1, 8947).AddDefaultValueDescription("1").String, + MarkdownDescription: helpers.NewAttributeDescription("Set NAT UDP session timeout, in minutes, Attribute conditional on `nat_ipv4` being equal to `true`").AddIntegerRangeDescription(1, 8947).AddDefaultValueDescription("1").String, Optional: true, Validators: []validator.Int64{ int64validator.Between(1, 8947), }, }, "nat_udp_timeout_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "nat_tcp_timeout": schema.Int64Attribute{ - MarkdownDescription: helpers.NewAttributeDescription("Set NAT TCP session timeout, in minutes").AddIntegerRangeDescription(1, 8947).AddDefaultValueDescription("60").String, + MarkdownDescription: helpers.NewAttributeDescription("Set NAT TCP session timeout, in minutes, Attribute conditional on `nat_ipv4` being equal to `true`").AddIntegerRangeDescription(1, 8947).AddDefaultValueDescription("60").String, Optional: true, Validators: []validator.Int64{ int64validator.Between(1, 8947), }, }, "nat_tcp_timeout_variable": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Variable name").String, + MarkdownDescription: helpers.NewAttributeDescription("Variable name, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, }, "new_static_nats": schema.ListNestedAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("static NAT").String, + MarkdownDescription: helpers.NewAttributeDescription("static NAT, Attribute conditional on `nat_ipv4` being equal to `true`").String, Optional: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ @@ -819,15 +819,15 @@ func (r *TransportWANVPNInterfaceEthernetProfileParcelResource) Schema(ctx conte Optional: true, }, "nat64": schema.BoolAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT64 on this interface").AddDefaultValueDescription("false").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT64 on this interface, Attribute conditional on `nat_ipv6` being equal to `true`").AddDefaultValueDescription("false").String, Optional: true, }, "nat66": schema.BoolAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("NAT66 on this interface").AddDefaultValueDescription("false").String, + MarkdownDescription: helpers.NewAttributeDescription("NAT66 on this interface, Attribute conditional on `nat_ipv6` being equal to `true`").AddDefaultValueDescription("false").String, Optional: true, }, "static_nat66": schema.ListNestedAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("static NAT66").String, + MarkdownDescription: helpers.NewAttributeDescription("static NAT66, Attribute conditional on `nat_ipv6` being equal to `true`").String, Optional: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 311164b0..13308638 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -13,6 +13,7 @@ description: |- - BREAKING CHANGE: Rename `sla_class_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `sla_class_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_application_aware_routing_policy_definition` resource to `preferred_color_group_list_id` - BREAKING CHANGE: Rename `preferred_color_group_list` attribute of `sdwan_traffic_data_policy_definition` resource to `preferred_color_group_list_id` +- Fix issue, where NAT IPv4 and IPv6 is always configured on `sdwan_transport_wan_vpn_interface_ethernet_feature`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/485) - Add missing options under `unsupported_features` attribute of `sdwan_configuration_group`, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/478) - Add `sdwan_policy_group` resource and data source - Adds `enhanced_app_aware_routing` support to the `sdwan_cisco_system_feature_template` resource and data source