From e5556a7c46b91547308862e11aa20f984cc6e859 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Fri, 18 Oct 2024 08:46:20 -0400 Subject: [PATCH 1/2] clean up obsolete version constraints --- apstra/api_versions/constraints.go | 12 ---- apstra/api_versions/versions.go | 5 +- apstra/blueprint/blueprint.go | 63 +++++++++---------- apstra/blueprint/datacenter_generic_system.go | 28 +++------ apstra/compatibility/constraints.go | 1 + apstra/design/template_pod_based.go | 21 +++---- apstra/design/template_rack_based.go | 31 +++++---- apstra/resource_datacenter_blueprint.go | 6 +- apstra/resource_datacenter_blueprint_test.go | 5 -- ...resource_datacenter_generic_system_test.go | 2 - ...esource_datacenter_security_policy_test.go | 3 - ...rce_template_pod_based_integration_test.go | 36 +---------- apstra/resource_template_rack_based_test.go | 63 ------------------- 13 files changed, 69 insertions(+), 207 deletions(-) delete mode 100644 apstra/api_versions/constraints.go diff --git a/apstra/api_versions/constraints.go b/apstra/api_versions/constraints.go deleted file mode 100644 index 39ef4eaa..00000000 --- a/apstra/api_versions/constraints.go +++ /dev/null @@ -1,12 +0,0 @@ -package apiversions - -import ( - "github.com/hashicorp/go-version" -) - -var ( - Eq410 = version.MustConstraints(version.NewConstraint(Apstra410)) - Ge411 = version.MustConstraints(version.NewConstraint(">=" + Apstra411)) - Ge420 = version.MustConstraints(version.NewConstraint(">=" + Apstra420)) - Ge421 = version.MustConstraints(version.NewConstraint(">=" + Apstra421)) -) diff --git a/apstra/api_versions/versions.go b/apstra/api_versions/versions.go index f84f4e8b..efc03797 100644 --- a/apstra/api_versions/versions.go +++ b/apstra/api_versions/versions.go @@ -4,14 +4,13 @@ package apiversions // track back to this file. When support for an old release is dropped, these // constants should help track down code relevant to those versions. const ( - Apstra410 = "4.1.0" - Apstra411 = "4.1.1" - Apstra412 = "4.1.2" Apstra420 = "4.2.0" Apstra421 = "4.2.1" Apstra4211 = "4.2.1.1" Apstra422 = "4.2.2" Apstra500 = "5.0.0" + GeApstra421 = ">" + Apstra421 + LtApstra500 = "<" + Apstra500 ) diff --git a/apstra/blueprint/blueprint.go b/apstra/blueprint/blueprint.go index 137729c7..906b46da 100644 --- a/apstra/blueprint/blueprint.go +++ b/apstra/blueprint/blueprint.go @@ -8,7 +8,6 @@ import ( "github.com/Juniper/apstra-go-sdk/apstra" "github.com/Juniper/apstra-go-sdk/apstra/enum" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" apstraplanmodifier "github.com/Juniper/terraform-provider-apstra/apstra/apstra_plan_modifier" apstravalidator "github.com/Juniper/terraform-provider-apstra/apstra/apstra_validator" "github.com/Juniper/terraform-provider-apstra/apstra/constants" @@ -324,8 +323,8 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { }, "fabric_addressing": resourceSchema.StringAttribute{ MarkdownDescription: fmt.Sprintf("Addressing scheme for both superspine/spine and spine/leaf links. "+ - "Requires Apstra %s. Must be one of: %s", - apiversions.Ge411, strings.Join([]string{ + "Must be one of: %s", + strings.Join([]string{ apstra.AddressingSchemeIp4.String(), apstra.AddressingSchemeIp6.String(), apstra.AddressingSchemeIp46.String(), @@ -423,7 +422,7 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { "default_ip_links_to_generic_mtu": resourceSchema.Int64Attribute{ MarkdownDescription: fmt.Sprintf("Default L3 MTU for IP links to generic systems. A null or empty "+ "value implies AOS will not render explicit MTU value and system defaults will be used. Should be an "+ - "even number between %d and %d. Requires Apstra %s", constants.L3MtuMin, constants.L3MtuMax, apiversions.Ge420), + "even number between %d and %d.", constants.L3MtuMin, constants.L3MtuMax), Optional: true, Computed: true, Validators: []validator.Int64{ @@ -433,7 +432,7 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { }, "default_svi_l3_mtu": resourceSchema.Int64Attribute{ MarkdownDescription: fmt.Sprintf("Default L3 MTU for SVI interfaces. Should be an even number "+ - "between %d and %d. Requires Apstra %s.", constants.L3MtuMin, constants.L3MtuMax, apiversions.Ge420), + "between %d and %d.", constants.L3MtuMin, constants.L3MtuMax), Optional: true, Computed: true, Validators: []validator.Int64{ @@ -455,19 +454,19 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { "evpn_type_5_routes": resourceSchema.BoolAttribute{ Computed: true, Optional: true, - MarkdownDescription: fmt.Sprintf("When `true`, all EVPN VTEPs in the fabric will redistribute "+ - "ARP/IPV6 ND (when possible on NOS type) as EVPN type 5 /32 routes in the routing table. Currently, "+ - "this option is only certified for Juniper Junos. FRR (SONiC) does this implicitly and cannot be "+ - "disabled. This setting will be ignored. On Arista and Cisco, no configuration is rendered and will "+ - "result in a Blueprint warning that it is not supported by AOS. This value is disabled by default, as "+ - "it generates a very large number of routes in the BGP routing table and takes large amounts of TCAM. "+ - "When these /32 & /128 routes are generated, they enable direct unicast routing to host destinations "+ - "on VNIs that are not stretched to the ingress VTEP, and avoid a route lookup to a subnet (eg, /24) "+ - "that may be hosted on many leafs. Requires Apstra %s.", apiversions.Ge420), + MarkdownDescription: "When `true`, all EVPN VTEPs in the fabric will redistribute " + + "ARP/IPV6 ND (when possible on NOS type) as EVPN type 5 /32 routes in the routing table. Currently, " + + "this option is only certified for Juniper Junos. FRR (SONiC) does this implicitly and cannot be " + + "disabled. This setting will be ignored. On Arista and Cisco, no configuration is rendered and will " + + "result in a Blueprint warning that it is not supported by AOS. This value is disabled by default, as " + + "it generates a very large number of routes in the BGP routing table and takes large amounts of TCAM. " + + "When these /32 & /128 routes are generated, they enable direct unicast routing to host destinations " + + "on VNIs that are not stretched to the ingress VTEP, and avoid a route lookup to a subnet (eg, /24) " + + "that may be hosted on many leafs.", }, "fabric_mtu": resourceSchema.Int64Attribute{ - MarkdownDescription: fmt.Sprintf("MTU of fabric links. Must be an even number between %d and %d. "+ - "Requires Apstra %s.", constants.L3MtuMin, constants.L3MtuMax, apiversions.Ge420), + MarkdownDescription: fmt.Sprintf("MTU of fabric links. Must be an even number between %d and %d.", + constants.L3MtuMin, constants.L3MtuMax), Optional: true, Computed: true, Validators: []validator.Int64{ @@ -495,33 +494,31 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { "junos_evpn_max_nexthop_and_interface_number": resourceSchema.BoolAttribute{ Computed: true, Optional: true, - MarkdownDescription: fmt.Sprintf("**Changing this value will result in a disruptive restart of the "+ - "PFE.** Enables configuring the maximum number of nexthops and interface numbers reserved for use in "+ - "EVPN-VXLAN overlay network on Junos leaf devices. AOS default is `true`. Requires Apstra %s", - apiversions.Ge420), + MarkdownDescription: "**Changing this value will result in a disruptive restart of the " + + "PFE.** Enables configuring the maximum number of nexthops and interface numbers reserved for use in " + + "EVPN-VXLAN overlay network on Junos leaf devices. AOS default is `true`.", }, "junos_evpn_routing_instance_mode_mac_vrf": resourceSchema.BoolAttribute{ Computed: true, Optional: true, - MarkdownDescription: fmt.Sprintf("In releases before 4.2, Apstra used a single default switch "+ - "instance as the configuration model for Junos. In Apstra 4.2, Apstra transitioned to using MAC-VRF for "+ - "all new blueprints and normalized the configuration of Junos to Junos Evolved. This option allows you "+ - "to transition Junos devices to the MAC-VRF configuration model for any blueprints deployed before the "+ - "4.2 release. All models use the VLAN-Aware service type. Requires Apstra %s", apiversions.Ge420), + MarkdownDescription: "In releases before 4.2, Apstra used a single default switch " + + "instance as the configuration model for Junos. In Apstra 4.2, Apstra transitioned to using MAC-VRF for " + + "all new blueprints and normalized the configuration of Junos to Junos Evolved. This option allows you " + + "to transition Junos devices to the MAC-VRF configuration model for any blueprints deployed before the " + + "4.2 release. All models use the VLAN-Aware service type.", }, "junos_ex_overlay_ecmp": resourceSchema.BoolAttribute{ Computed: true, Optional: true, - MarkdownDescription: fmt.Sprintf("**Changing this value will result in a disruptive restart of the "+ - "PFE on EX-series devices.** When `true,`VXLAN Overlay ECMP will be enabled on Junos EX-series devices. "+ - "Requires Apstra %s.", apiversions.Ge420), + MarkdownDescription: "**Changing this value will result in a disruptive restart of the " + + "PFE on EX-series devices.** When `true,`VXLAN Overlay ECMP will be enabled on Junos EX-series devices. ", }, "junos_graceful_restart": resourceSchema.BoolAttribute{ Computed: true, Optional: true, - MarkdownDescription: fmt.Sprintf("**Changing this value may result in a flap of all BGP sessions as "+ - "the sessions are re-negotiated.** When `true`, the bgp graceful restart feature is enabled on Junos "+ - "devices. Requires Apstra %s", apiversions.Ge420), + MarkdownDescription: "**Changing this value may result in a flap of all BGP sessions as " + + "the sessions are re-negotiated.** When `true`, the bgp graceful restart feature is enabled on Junos " + + "devices.", }, "max_evpn_routes_count": resourceSchema.Int64Attribute{ MarkdownDescription: "Maximum number of EVPN routes to accept on Leaf Switches. " + @@ -573,8 +570,8 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute { Validators: []validator.Int64{int64validator.Between(-1, math.MaxUint32)}, }, "optimize_routing_zone_footprint": resourceSchema.BoolAttribute{ - MarkdownDescription: fmt.Sprintf("When `true`: routing zones will not be rendered on leafs where "+ - "they are not required, resulting in less resource consumption. Requires Apstra %s", apiversions.Ge420), + MarkdownDescription: "When `true`: routing zones will not be rendered on leafs where " + + "they are not required, resulting in less resource consumption.", Optional: true, Computed: true, }, diff --git a/apstra/blueprint/datacenter_generic_system.go b/apstra/blueprint/datacenter_generic_system.go index 2811fc32..94388b9c 100644 --- a/apstra/blueprint/datacenter_generic_system.go +++ b/apstra/blueprint/datacenter_generic_system.go @@ -11,7 +11,6 @@ import ( "github.com/Juniper/apstra-go-sdk/apstra" "github.com/Juniper/apstra-go-sdk/apstra/enum" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" "github.com/Juniper/terraform-provider-apstra/apstra/constants" "github.com/Juniper/terraform-provider-apstra/apstra/design" "github.com/Juniper/terraform-provider-apstra/apstra/utils" @@ -93,9 +92,8 @@ func (o DatacenterGenericSystem) ResourceAttributes() map[string]resourceSchema. }, }, "links": resourceSchema.SetNestedAttribute{ - MarkdownDescription: fmt.Sprintf("Generic System link details. Note that tagging Links requires "+ - "Apstra %s or newer.", apiversions.Apstra412), - Required: true, + MarkdownDescription: "Generic System link details.", + Required: true, NestedObject: resourceSchema.NestedAttributeObject{ Attributes: DatacenterGenericSystemLink{}.ResourceAttributes(), }, @@ -122,26 +120,20 @@ func (o DatacenterGenericSystem) ResourceAttributes() map[string]resourceSchema. Optional: true, }, "port_channel_id_min": resourceSchema.Int64Attribute{ - MarkdownDescription: fmt.Sprintf("Omit this attribute to allow any available port-channel to be "+ - "used. In Apstra version %s and earlier, all port channel min/max constraints had to be unique per "+ - "blueprint. Port channel ranges could not overlap. This requirement has been relaxed, and now they "+ - "need only be unique per system.", apiversions.Apstra412), - Optional: true, - Computed: true, - Default: int64default.StaticInt64(design.PoIdMin), + MarkdownDescription: "Omit this attribute to allow any available port-channel to be used.", + Optional: true, + Computed: true, + Default: int64default.StaticInt64(design.PoIdMin), Validators: []validator.Int64{ int64validator.Between(design.PoIdMin, design.PoIdMax), int64validator.AlsoRequires(path.MatchRelative().AtParent().AtName("port_channel_id_max")), }, }, "port_channel_id_max": resourceSchema.Int64Attribute{ - MarkdownDescription: fmt.Sprintf("Omit this attribute to allow any available port-channel to be "+ - "used. In Apstra version %s and earlier, all port channel min/max constraints had to be unique per "+ - "blueprint. Port channel ranges could not overlap. This requirement has been relaxed, and now they "+ - "need only be unique per system.", apiversions.Apstra412), - Optional: true, - Computed: true, - Default: int64default.StaticInt64(design.PoIdMin), + MarkdownDescription: "Omit this attribute to allow any available port-channel to be used.", + Optional: true, + Computed: true, + Default: int64default.StaticInt64(design.PoIdMin), Validators: []validator.Int64{ int64validator.Between(design.PoIdMin, design.PoIdMax), int64validator.AtLeastSumOf(path.MatchRelative().AtParent().AtName("port_channel_id_min")), diff --git a/apstra/compatibility/constraints.go b/apstra/compatibility/constraints.go index 0dc5f997..0d760846 100644 --- a/apstra/compatibility/constraints.go +++ b/apstra/compatibility/constraints.go @@ -10,6 +10,7 @@ var ( BpIbaDashboardOk = versionconstraints.New(apiversions.LtApstra500) BpIbaProbeOk = versionconstraints.New(apiversions.LtApstra500) BpIbaWidgetOk = versionconstraints.New(apiversions.LtApstra500) + FabricSettingsSetInCreate = versionconstraints.New(apiversions.GeApstra421) TemplateRequiresAntiAffinityPolicy = versionconstraints.New(apiversions.Apstra420) VnEmptyBindingsOk = versionconstraints.New(">= 5.0.0") ) diff --git a/apstra/design/template_pod_based.go b/apstra/design/template_pod_based.go index 782c51ed..4434af44 100644 --- a/apstra/design/template_pod_based.go +++ b/apstra/design/template_pod_based.go @@ -2,10 +2,7 @@ package design import ( "context" - "fmt" - "github.com/Juniper/apstra-go-sdk/apstra" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" apstravalidator "github.com/Juniper/terraform-provider-apstra/apstra/apstra_validator" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator" @@ -66,10 +63,9 @@ func (o TemplatePodBased) DataSourceAttributes() map[string]dataSourceSchema.Att Attributes: SuperSpine{}.DataSourceAttributes(), }, "fabric_link_addressing": dataSourceSchema.StringAttribute{ - DeprecationMessage: fmt.Sprintf("Apstra %s is not supported by this release. This field must not be used.", apiversions.Apstra410), - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/Superspine links. Applies only to "+ - "Apstra %s.", apiversions.Apstra410), - Computed: true, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/Superspine links.", + Computed: true, }, "pod_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Pod Type info (count + details)", @@ -99,12 +95,11 @@ func (o TemplatePodBased) ResourceAttributes() map[string]resourceSchema.Attribu Attributes: SuperSpine{}.ResourceAttributes(), }, "fabric_link_addressing": resourceSchema.StringAttribute{ - DeprecationMessage: fmt.Sprintf("Apstra %s is not supported by this release. This field must not be used.", apiversions.Apstra410), - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/SuperSpine links. Required for "+ - "Apstra <= %s, not supported by Apstra >= %s.", apiversions.Apstra410, apiversions.Apstra411), - Optional: true, - Computed: true, - Validators: []validator.String{apstravalidator.MustBeOneOf([]attr.Value{types.StringNull()})}, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/SuperSpine links.", + Optional: true, + Computed: true, + Validators: []validator.String{apstravalidator.MustBeOneOf([]attr.Value{types.StringNull()})}, }, "pod_infos": resourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Pod Type info (count + details) keyed by Pod Based Template ID.", diff --git a/apstra/design/template_rack_based.go b/apstra/design/template_rack_based.go index 2fc2873e..55ebc311 100644 --- a/apstra/design/template_rack_based.go +++ b/apstra/design/template_rack_based.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/Juniper/apstra-go-sdk/apstra" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" apstravalidator "github.com/Juniper/terraform-provider-apstra/apstra/apstra_validator" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator" @@ -79,9 +78,9 @@ func (o TemplateRackBased) DataSourceAttributes() map[string]dataSourceSchema.At Computed: true, }, "fabric_link_addressing": dataSourceSchema.StringAttribute{ - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/Leaf links. Applies only to "+ - "Apstra %s.", apiversions.Apstra410), - Computed: true, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", + Computed: true, }, "rack_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details)", @@ -118,10 +117,9 @@ func (o TemplateRackBased) DataSourceAttributesNested() map[string]dataSourceSch Computed: true, }, "fabric_link_addressing": dataSourceSchema.StringAttribute{ - DeprecationMessage: fmt.Sprintf("Apstra %s is not supported by this release. This field must not be used.", apiversions.Apstra410), - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/Leaf links. Applies only to "+ - "Apstra %s.", apiversions.Apstra410), - Computed: true, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", + Computed: true, }, "rack_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details)", @@ -166,12 +164,11 @@ func (o TemplateRackBased) ResourceAttributes() map[string]resourceSchema.Attrib }, }, "fabric_link_addressing": resourceSchema.StringAttribute{ - DeprecationMessage: fmt.Sprintf("Apstra %s is not supported by this release. This field must not be used.", apiversions.Apstra410), - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/Leaf links. Required for "+ - "Apstra <= %s, not supported by Apstra >= %s.", apiversions.Apstra410, apiversions.Apstra411), - Optional: true, - Computed: true, - Validators: []validator.String{apstravalidator.MustBeOneOf([]attr.Value{types.StringNull()})}, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", + Optional: true, + Computed: true, + Validators: []validator.String{apstravalidator.MustBeOneOf([]attr.Value{types.StringNull()})}, }, "rack_infos": resourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details) keyed by Rack Type ID.", @@ -209,9 +206,9 @@ func (o TemplateRackBased) ResourceAttributesNested() map[string]resourceSchema. Computed: true, }, "fabric_link_addressing": resourceSchema.StringAttribute{ - MarkdownDescription: fmt.Sprintf("Fabric addressing scheme for Spine/Leaf links. Applies only to "+ - "Apstra %s.", apiversions.Apstra410), - Computed: true, + DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", + MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", + Computed: true, }, "rack_infos": resourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details)", diff --git a/apstra/resource_datacenter_blueprint.go b/apstra/resource_datacenter_blueprint.go index 82bce858..f72d12be 100644 --- a/apstra/resource_datacenter_blueprint.go +++ b/apstra/resource_datacenter_blueprint.go @@ -3,9 +3,9 @@ package tfapstra import ( "context" "fmt" + "github.com/Juniper/terraform-provider-apstra/apstra/compatibility" "github.com/Juniper/apstra-go-sdk/apstra" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" "github.com/Juniper/terraform-provider-apstra/apstra/blueprint" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" @@ -88,8 +88,8 @@ func (o *resourceDatacenterBlueprint) Create(ctx context.Context, req resource.C } // Apstra 4.2.1 allows us to set *some* fabric settings as part of blueprint creation. - // Depending on what's in the plan, we might not need to invoke SetFabricSettings(). - if !apiversions.Ge421.Check(apiVersion) || plan.Ipv6Applications.ValueBool() { + // Depending on the version and what's in the plan, we might not need to invoke SetFabricSettings(). + if !compatibility.FabricSettingsSetInCreate.Check(apiVersion) || plan.Ipv6Applications.ValueBool() { // Set the fabric settings plan.SetFabricSettings(ctx, bp, nil, &resp.Diagnostics) if resp.Diagnostics.HasError() { diff --git a/apstra/resource_datacenter_blueprint_test.go b/apstra/resource_datacenter_blueprint_test.go index cfa0acc8..fe812a1c 100644 --- a/apstra/resource_datacenter_blueprint_test.go +++ b/apstra/resource_datacenter_blueprint_test.go @@ -10,7 +10,6 @@ import ( "testing" "github.com/Juniper/apstra-go-sdk/apstra" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" testutils "github.com/Juniper/terraform-provider-apstra/apstra/test_utils" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" @@ -508,7 +507,6 @@ func TestResourceDatacenterBlueprint(t *testing.T) { }, }, "evpn_start_minimal_42x": { - apiVersionConstraints: apiversions.Ge420, testCase: resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ @@ -670,7 +668,6 @@ func TestResourceDatacenterBlueprint(t *testing.T) { }, }, "evpn_start_maximal_42x": { - apiVersionConstraints: apiversions.Ge420, testCase: resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ @@ -1198,7 +1195,6 @@ func TestResourceDatacenterBlueprint(t *testing.T) { }, }, "ip_start_minimal_42x": { - apiVersionConstraints: apiversions.Ge420, testCase: resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ @@ -1360,7 +1356,6 @@ func TestResourceDatacenterBlueprint(t *testing.T) { }, }, "ip_start_maximal_42x": { - apiVersionConstraints: apiversions.Ge420, testCase: resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ diff --git a/apstra/resource_datacenter_generic_system_test.go b/apstra/resource_datacenter_generic_system_test.go index b749cb39..44487600 100644 --- a/apstra/resource_datacenter_generic_system_test.go +++ b/apstra/resource_datacenter_generic_system_test.go @@ -10,7 +10,6 @@ import ( "github.com/Juniper/apstra-go-sdk/apstra" "github.com/Juniper/apstra-go-sdk/apstra/enum" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" testutils "github.com/Juniper/terraform-provider-apstra/apstra/test_utils" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" @@ -304,7 +303,6 @@ func TestResourceDatacenterGenericSystem_A(t *testing.T) { testCases := map[string]testCase{ "lots_of_changes": { - versionConstraints: version.MustConstraints(version.NewConstraint(">" + apiversions.Apstra411)), // tags allowed in 4.1.1 only steps: []testStep{ { genericSystem: genericSystem{ diff --git a/apstra/resource_datacenter_security_policy_test.go b/apstra/resource_datacenter_security_policy_test.go index a0a32192..4d67446c 100644 --- a/apstra/resource_datacenter_security_policy_test.go +++ b/apstra/resource_datacenter_security_policy_test.go @@ -11,7 +11,6 @@ import ( "github.com/Juniper/apstra-go-sdk/apstra" "github.com/Juniper/apstra-go-sdk/apstra/enum" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" testutils "github.com/Juniper/terraform-provider-apstra/apstra/test_utils" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" @@ -349,7 +348,6 @@ func TestResourceDatacenterSecurityPolicy(t *testing.T) { resource.TestCheckResourceAttr(resourceDataCenterSecurityPolicyRefName, "rules.2.source_ports.#", "4"), resource.TestCheckResourceAttr(resourceDataCenterSecurityPolicyRefName, "rules.2.destination_ports.#", "1"), }, - minVersion: version.Must(version.NewVersion(apiversions.Apstra412)), }, { config: apstra.PolicyData{ @@ -418,7 +416,6 @@ func TestResourceDatacenterSecurityPolicy(t *testing.T) { resource.TestCheckResourceAttr(resourceDataCenterSecurityPolicyRefName, "rules.2.source_ports.#", "3"), resource.TestCheckResourceAttr(resourceDataCenterSecurityPolicyRefName, "rules.2.destination_ports.#", "2"), }, - minVersion: version.Must(version.NewVersion(apiversions.Apstra412)), }, { config: apstra.PolicyData{ diff --git a/apstra/resource_template_pod_based_integration_test.go b/apstra/resource_template_pod_based_integration_test.go index 7b16918b..96b9eff6 100644 --- a/apstra/resource_template_pod_based_integration_test.go +++ b/apstra/resource_template_pod_based_integration_test.go @@ -9,12 +9,9 @@ import ( "strings" "testing" - "github.com/Juniper/apstra-go-sdk/apstra" tfapstra "github.com/Juniper/terraform-provider-apstra/apstra" - "github.com/Juniper/terraform-provider-apstra/apstra/utils" - - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" testutils "github.com/Juniper/terraform-provider-apstra/apstra/test_utils" + "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -104,38 +101,7 @@ func TestResourceTemplatePodBased(t *testing.T) { } testCases := map[string]testCase{ - "apstra_410_only": { - apiVersionConstraints: apiversions.Eq410, - steps: []testStep{ - { - config: resourceTestPodTemplate{ - name: acctest.RandString(6), - fabricLinkAddressing: utils.ToPtr(apstra.AddressingSchemeIp4.String()), - ssLd: "AOS-4x40_8x10-1", - perPlaneCount: 2, - podInfo: map[string]int{ - "pod_single": 1, - "pod_mlag": 1, - }, - }, - }, - { - config: resourceTestPodTemplate{ - name: acctest.RandString(6), - fabricLinkAddressing: utils.ToPtr(apstra.AddressingSchemeIp4.String()), - ssLd: "AOS-4x40_8x10-1", - perPlaneCount: 4, - planeCount: utils.ToPtr(2), - podInfo: map[string]int{ - "pod_single": 2, - "pod_mlag": 2, - }, - }, - }, - }, - }, "apstra_411_and_later": { - apiVersionConstraints: apiversions.Ge411, steps: []testStep{ { config: resourceTestPodTemplate{ diff --git a/apstra/resource_template_rack_based_test.go b/apstra/resource_template_rack_based_test.go index fb898f98..d47d6cd2 100644 --- a/apstra/resource_template_rack_based_test.go +++ b/apstra/resource_template_rack_based_test.go @@ -9,7 +9,6 @@ import ( "strings" "testing" - apiversions "github.com/Juniper/terraform-provider-apstra/apstra/api_versions" testutils "github.com/Juniper/terraform-provider-apstra/apstra/test_utils" "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-testing/helper/acctest" @@ -90,7 +89,6 @@ func TestResourceTemplateRackBased(t *testing.T) { testCases := map[string]testCase{ "a": { - apiVersionConstraints: version.MustConstraints(version.NewConstraint(">=" + apiversions.Apstra411)), testCase: resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ @@ -145,67 +143,6 @@ func TestResourceTemplateRackBased(t *testing.T) { }, }, }, - - "b": { - apiVersionConstraints: version.MustConstraints(version.NewConstraint(apiversions.Apstra410)), - testCase: resource.TestCase{ - ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, - Steps: []resource.TestStep{ - { - Config: renderConfig(config{ - name: "b1_" + rs, - asnAllocationScheme: "unique", - overlayControlProtocol: "evpn", - rackInfos: map[string]int{ - "L2_Virtual": 1, - }, - spine: spine{ - count: 1, - logicalDeviceId: "AOS-7x10-Spine", - }, - fabricLinkAddressing: "ipv4", - }), - Check: resource.ComposeAggregateTestCheckFunc([]resource.TestCheckFunc{ - resource.TestCheckResourceAttrSet("apstra_template_rack_based.test", "id"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "name", "b1_"+rs), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "asn_allocation_scheme", "unique"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "overlay_control_protocol", "evpn"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "fabric_link_addressing", "ipv4"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "spine.count", "1"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "spine.logical_device_id", "AOS-7x10-Spine"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "rack_infos.%", "1"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "rack_infos.L2_Virtual.count", "1"), - }...), - }, - { - Config: renderConfig(config{ - name: "b2_" + rs, - asnAllocationScheme: "single", - overlayControlProtocol: "static", - rackInfos: map[string]int{ - "L2_Virtual_Dual_2x_Links": 2, - }, - spine: spine{ - count: 2, - logicalDeviceId: "AOS-4x10-1", - }, - fabricLinkAddressing: "ipv6", - }), - Check: resource.ComposeAggregateTestCheckFunc([]resource.TestCheckFunc{ - resource.TestCheckResourceAttrSet("apstra_template_rack_based.test", "id"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "name", "b2_"+rs), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "asn_allocation_scheme", "single"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "overlay_control_protocol", "static"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "fabric_link_addressing", "ipv6"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "spine.count", "2"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "spine.logical_device_id", "AOS-4x10-1"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "rack_infos.%", "1"), - resource.TestCheckResourceAttr("apstra_template_rack_based.test", "rack_infos.L2_Virtual_Dual_2x_Links.count", "2"), - }...), - }, - }, - }, - }, } for tName, tCase := range testCases { From 3a390e22a7daa40895ce27fe66f0236417216488 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Fri, 18 Oct 2024 08:51:25 -0400 Subject: [PATCH 2/2] make docs; gofumpt --- apstra/design/template_pod_based.go | 1 + apstra/resource_datacenter_blueprint.go | 2 +- apstra/resource_datacenter_blueprint_test.go | 2 +- docs/data-sources/template_pod_based.md | 4 ++-- docs/data-sources/template_rack_based.md | 2 +- docs/resources/datacenter_blueprint.md | 20 ++++++++++---------- docs/resources/datacenter_generic_system.md | 6 +++--- docs/resources/template_pod_based.md | 4 ++-- docs/resources/template_rack_based.md | 2 +- 9 files changed, 22 insertions(+), 21 deletions(-) diff --git a/apstra/design/template_pod_based.go b/apstra/design/template_pod_based.go index 4434af44..844f7fb6 100644 --- a/apstra/design/template_pod_based.go +++ b/apstra/design/template_pod_based.go @@ -2,6 +2,7 @@ package design import ( "context" + "github.com/Juniper/apstra-go-sdk/apstra" apstravalidator "github.com/Juniper/terraform-provider-apstra/apstra/apstra_validator" "github.com/Juniper/terraform-provider-apstra/apstra/utils" diff --git a/apstra/resource_datacenter_blueprint.go b/apstra/resource_datacenter_blueprint.go index f72d12be..97584bec 100644 --- a/apstra/resource_datacenter_blueprint.go +++ b/apstra/resource_datacenter_blueprint.go @@ -3,10 +3,10 @@ package tfapstra import ( "context" "fmt" - "github.com/Juniper/terraform-provider-apstra/apstra/compatibility" "github.com/Juniper/apstra-go-sdk/apstra" "github.com/Juniper/terraform-provider-apstra/apstra/blueprint" + "github.com/Juniper/terraform-provider-apstra/apstra/compatibility" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/apstra/resource_datacenter_blueprint_test.go b/apstra/resource_datacenter_blueprint_test.go index fe812a1c..574ebb9b 100644 --- a/apstra/resource_datacenter_blueprint_test.go +++ b/apstra/resource_datacenter_blueprint_test.go @@ -1563,7 +1563,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) { for tName, tCase := range testCases { tName, tCase := tName, tCase t.Run(tName, func(t *testing.T) { - //t.Parallel() + // t.Parallel() if !tCase.apiVersionConstraints.Check(apiVersion) { t.Skipf("API version %s does not satisfy version constraints(%s) of test %q", apiVersion, tCase.apiVersionConstraints, tName) diff --git a/docs/data-sources/template_pod_based.md b/docs/data-sources/template_pod_based.md index 123ab347..b76fa8ee 100644 --- a/docs/data-sources/template_pod_based.md +++ b/docs/data-sources/template_pod_based.md @@ -35,7 +35,7 @@ resource "apstra_template_pod_based" "example" { ### Read-Only -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Superspine links. Applies only to Apstra 4.1.0. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Superspine links. - `pod_infos` (Attributes Map) Map of Pod Type info (count + details) (see [below for nested schema](#nestedatt--pod_infos)) - `super_spine` (Attributes) Super Spine layer details (see [below for nested schema](#nestedatt--super_spine)) @@ -53,7 +53,7 @@ Read-Only: Read-Only: - `asn_allocation_scheme` (String) "unique" is for 3-stage designs; "single" is for 5-stage designs. -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. Applies only to Apstra 4.1.0. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. - `id` (String) ID of the pod inside the 5 stage template. - `name` (String) Name of the pod inside the 5 stage template. - `overlay_control_protocol` (String) Defines the inter-rack virtual network overlay protocol in the fabric. diff --git a/docs/data-sources/template_rack_based.md b/docs/data-sources/template_rack_based.md index acdfdd2c..cf17f046 100644 --- a/docs/data-sources/template_rack_based.md +++ b/docs/data-sources/template_rack_based.md @@ -48,7 +48,7 @@ output "rack_based_template_id_to_name" { ### Read-Only - `asn_allocation_scheme` (String) "unique" is for 3-stage designs; "single" is for 5-stage designs. -- `fabric_link_addressing` (String) Fabric addressing scheme for Spine/Leaf links. Applies only to Apstra 4.1.0. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. - `overlay_control_protocol` (String) Defines the inter-rack virtual network overlay protocol in the fabric. - `rack_infos` (Attributes Map) Map of Rack Type info (count + details) (see [below for nested schema](#nestedatt--rack_infos)) - `spine` (Attributes) Spine layer details (see [below for nested schema](#nestedatt--spine)) diff --git a/docs/resources/datacenter_blueprint.md b/docs/resources/datacenter_blueprint.md index 1970beb4..b5dcef28 100644 --- a/docs/resources/datacenter_blueprint.md +++ b/docs/resources/datacenter_blueprint.md @@ -106,22 +106,22 @@ resource "apstra_blueprint_deployment" "deploy" { * `enabled_loose` - controls interface names that were not defined by the user. Does not control or override user-defined cabling. (If you haven't explicitly assigned any interface names, loose and strict are effectively the same policy.) * `enabled_strict` - completely controls port distribution and could override user-defined assignments. When you enable the strict policy, a statement appears at the top of the cabling map (Staged/Active > Physical > Links and Staged/Active > Physical > Topology Selection) stating that the anti-affinity policy is enabled. - `anti_affinity_policy` (Attributes) When designing high availability (HA) systems, you want parallel links between two devices to terminate on different physical ports, thus avoiding transceiver failures from impacting both links on a device. Depending on the number of interfaces on a system, manually modifying these links could be time-consuming. With the anti-affinity policy you can apply certain constraints to the cabling map to control automatic port assignments. (see [below for nested schema](#nestedatt--anti_affinity_policy)) -- `default_ip_links_to_generic_mtu` (Number) Default L3 MTU for IP links to generic systems. A null or empty value implies AOS will not render explicit MTU value and system defaults will be used. Should be an even number between 1280 and 9216. Requires Apstra >=4.2.0 -- `default_svi_l3_mtu` (Number) Default L3 MTU for SVI interfaces. Should be an even number between 1280 and 9216. Requires Apstra >=4.2.0. +- `default_ip_links_to_generic_mtu` (Number) Default L3 MTU for IP links to generic systems. A null or empty value implies AOS will not render explicit MTU value and system defaults will be used. Should be an even number between 1280 and 9216. +- `default_svi_l3_mtu` (Number) Default L3 MTU for SVI interfaces. Should be an even number between 1280 and 9216. - `esi_mac_msb` (Number) ESI MAC address most significant byte. Must be an even number between 0 and 254 inclusive. -- `evpn_type_5_routes` (Boolean) When `true`, all EVPN VTEPs in the fabric will redistribute ARP/IPV6 ND (when possible on NOS type) as EVPN type 5 /32 routes in the routing table. Currently, this option is only certified for Juniper Junos. FRR (SONiC) does this implicitly and cannot be disabled. This setting will be ignored. On Arista and Cisco, no configuration is rendered and will result in a Blueprint warning that it is not supported by AOS. This value is disabled by default, as it generates a very large number of routes in the BGP routing table and takes large amounts of TCAM. When these /32 & /128 routes are generated, they enable direct unicast routing to host destinations on VNIs that are not stretched to the ingress VTEP, and avoid a route lookup to a subnet (eg, /24) that may be hosted on many leafs. Requires Apstra >=4.2.0. -- `fabric_addressing` (String) Addressing scheme for both superspine/spine and spine/leaf links. Requires Apstra >=4.1.1. Must be one of: ipv4, ipv6, ipv4_ipv6 -- `fabric_mtu` (Number) MTU of fabric links. Must be an even number between 1280 and 9216. Requires Apstra >=4.2.0. +- `evpn_type_5_routes` (Boolean) When `true`, all EVPN VTEPs in the fabric will redistribute ARP/IPV6 ND (when possible on NOS type) as EVPN type 5 /32 routes in the routing table. Currently, this option is only certified for Juniper Junos. FRR (SONiC) does this implicitly and cannot be disabled. This setting will be ignored. On Arista and Cisco, no configuration is rendered and will result in a Blueprint warning that it is not supported by AOS. This value is disabled by default, as it generates a very large number of routes in the BGP routing table and takes large amounts of TCAM. When these /32 & /128 routes are generated, they enable direct unicast routing to host destinations on VNIs that are not stretched to the ingress VTEP, and avoid a route lookup to a subnet (eg, /24) that may be hosted on many leafs. +- `fabric_addressing` (String) Addressing scheme for both superspine/spine and spine/leaf links. Must be one of: ipv4, ipv6, ipv4_ipv6 +- `fabric_mtu` (Number) MTU of fabric links. Must be an even number between 1280 and 9216. - `ipv6_applications` (Boolean) Enables support for IPv6 virtual networks and IPv6 external connectivity points. This adds resource requirements and device configurations, including IPv6 loopback addresses on leafs, spines and superspines, IPv6 addresses for MLAG SVI subnets and IPv6 addresses for leaf L3 peer links. This option cannot be disabled without re-creating the Blueprint. Applies only to EVPN blueprints. -- `junos_evpn_max_nexthop_and_interface_number` (Boolean) **Changing this value will result in a disruptive restart of the PFE.** Enables configuring the maximum number of nexthops and interface numbers reserved for use in EVPN-VXLAN overlay network on Junos leaf devices. AOS default is `true`. Requires Apstra >=4.2.0 -- `junos_evpn_routing_instance_mode_mac_vrf` (Boolean) In releases before 4.2, Apstra used a single default switch instance as the configuration model for Junos. In Apstra 4.2, Apstra transitioned to using MAC-VRF for all new blueprints and normalized the configuration of Junos to Junos Evolved. This option allows you to transition Junos devices to the MAC-VRF configuration model for any blueprints deployed before the 4.2 release. All models use the VLAN-Aware service type. Requires Apstra >=4.2.0 -- `junos_ex_overlay_ecmp` (Boolean) **Changing this value will result in a disruptive restart of the PFE on EX-series devices.** When `true,`VXLAN Overlay ECMP will be enabled on Junos EX-series devices. Requires Apstra >=4.2.0. -- `junos_graceful_restart` (Boolean) **Changing this value may result in a flap of all BGP sessions as the sessions are re-negotiated.** When `true`, the bgp graceful restart feature is enabled on Junos devices. Requires Apstra >=4.2.0 +- `junos_evpn_max_nexthop_and_interface_number` (Boolean) **Changing this value will result in a disruptive restart of the PFE.** Enables configuring the maximum number of nexthops and interface numbers reserved for use in EVPN-VXLAN overlay network on Junos leaf devices. AOS default is `true`. +- `junos_evpn_routing_instance_mode_mac_vrf` (Boolean) In releases before 4.2, Apstra used a single default switch instance as the configuration model for Junos. In Apstra 4.2, Apstra transitioned to using MAC-VRF for all new blueprints and normalized the configuration of Junos to Junos Evolved. This option allows you to transition Junos devices to the MAC-VRF configuration model for any blueprints deployed before the 4.2 release. All models use the VLAN-Aware service type. +- `junos_ex_overlay_ecmp` (Boolean) **Changing this value will result in a disruptive restart of the PFE on EX-series devices.** When `true,`VXLAN Overlay ECMP will be enabled on Junos EX-series devices. +- `junos_graceful_restart` (Boolean) **Changing this value may result in a flap of all BGP sessions as the sessions are re-negotiated.** When `true`, the bgp graceful restart feature is enabled on Junos devices. - `max_evpn_routes_count` (Number) Maximum number of EVPN routes to accept on Leaf Switches. A positive integer will be rendered into the device BGP configuration as a maximum limit. Using a zero will render a `0` into the same line of configuration resulting in platform-specific behavior: Either *unlimited routes permitted*, or *no routes permitted* depending on the NOS in use. A `-1` can be used to force clear any prior configuration from Apstra, ensuring that no maximum value will be rendered into the BGP configuration (default device behavior). - `max_external_routes_count` (Number) Maximum number of routes to accept from external routers. A positive integer will be rendered into the device BGP configuration as a maximum limit. Using a zero will render a `0` into the same line of configuration resulting in platform-specific behavior: Either *unlimited routes permitted*, or *no routes permitted* depending on the NOS in use. A `-1` can be used to force clear any prior configuration from Apstra, ensuring that no maximum value will be rendered into the BGP configuration (default device behavior). - `max_fabric_routes_count` (Number) Maximum number of underlay routes permitted between fabric nodes. A positive integer will be rendered into the device BGP configuration as a maximum limit. Using a zero will render a `0` into the same line of configuration resulting in platform-specific behavior: Either *unlimited routes permitted*, or *no routes permitted* depending on the NOS in use. A `-1` can be used to force clear any prior configuration from Apstra, ensuring that no maximum value will be rendered into the BGP configuration (default device behavior).Setting this option may be required in the event of leaking EVPN routes from a Security Zone into the default Security Zone (VRF) which may generate a large number of /32 and /128 routes. It is suggested that this value be effectively unlimited on all Blueprints to ensure BGP stability in the underlay. Unlimited is also suggested for non-EVPN Blueprints considering the impact to traffic if spine-leaf sessions go offline. - `max_mlag_routes_count` (Number) Maximum number of routes to accept between MLAG peers. A positive integer will be rendered into the device BGP configuration as a maximum limit. Using a zero will render a `0` into the same line of configuration resulting in platform-specific behavior: Either *unlimited routes permitted*, or *no routes permitted* depending on the NOS in use. A `-1` can be used to force clear any prior configuration from Apstra, ensuring that no maximum value will be rendered into the BGP configuration (default device behavior). -- `optimize_routing_zone_footprint` (Boolean) When `true`: routing zones will not be rendered on leafs where they are not required, resulting in less resource consumption. Requires Apstra >=4.2.0 +- `optimize_routing_zone_footprint` (Boolean) When `true`: routing zones will not be rendered on leafs where they are not required, resulting in less resource consumption. ### Read-Only diff --git a/docs/resources/datacenter_generic_system.md b/docs/resources/datacenter_generic_system.md index a3030927..c603128a 100644 --- a/docs/resources/datacenter_generic_system.md +++ b/docs/resources/datacenter_generic_system.md @@ -79,7 +79,7 @@ resource "apstra_datacenter_generic_system" "example" { ### Required - `blueprint_id` (String) Apstra Blueprint ID. -- `links` (Attributes Set) Generic System link details. Note that tagging Links requires Apstra 4.1.2 or newer. (see [below for nested schema](#nestedatt--links)) +- `links` (Attributes Set) Generic System link details. (see [below for nested schema](#nestedatt--links)) ### Optional @@ -94,8 +94,8 @@ resource "apstra_datacenter_generic_system" "example" { - `loopback_ipv4` (String) IPv4 address of loopback interface in CIDR notation - `loopback_ipv6` (String) IPv6 address of loopback interface in CIDR notation - `name` (String) Name displayed in the Apstra web UI. -- `port_channel_id_max` (Number) Omit this attribute to allow any available port-channel to be used. In Apstra version 4.1.2 and earlier, all port channel min/max constraints had to be unique per blueprint. Port channel ranges could not overlap. This requirement has been relaxed, and now they need only be unique per system. -- `port_channel_id_min` (Number) Omit this attribute to allow any available port-channel to be used. In Apstra version 4.1.2 and earlier, all port channel min/max constraints had to be unique per blueprint. Port channel ranges could not overlap. This requirement has been relaxed, and now they need only be unique per system. +- `port_channel_id_max` (Number) Omit this attribute to allow any available port-channel to be used. +- `port_channel_id_min` (Number) Omit this attribute to allow any available port-channel to be used. - `tags` (Set of String) Tag labels to be applied to this Generic System. If a Tag doesn't exist in the Blueprint it will be created automatically. ### Read-Only diff --git a/docs/resources/template_pod_based.md b/docs/resources/template_pod_based.md index 65a522fe..e66ebcd0 100644 --- a/docs/resources/template_pod_based.md +++ b/docs/resources/template_pod_based.md @@ -41,7 +41,7 @@ resource "apstra_template_pod_based" "example" { ### Optional -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/SuperSpine links. Required for Apstra <= 4.1.0, not supported by Apstra >= 4.1.1. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/SuperSpine links. ### Read-Only @@ -64,7 +64,7 @@ Read-Only: Read-Only: - `asn_allocation_scheme` (String) "unique" is for 3-stage designs; "single" is for 5-stage designs. -- `fabric_link_addressing` (String) Fabric addressing scheme for Spine/Leaf links. Applies only to Apstra 4.1.0. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. - `id` (String) ID of the pod inside the 5 stage template. - `name` (String) Name of the pod inside the 5 stage template. - `overlay_control_protocol` (String) Defines the inter-rack virtual network overlay protocol in the fabric. diff --git a/docs/resources/template_rack_based.md b/docs/resources/template_rack_based.md index 59b562c0..313b1d31 100644 --- a/docs/resources/template_rack_based.md +++ b/docs/resources/template_rack_based.md @@ -55,7 +55,7 @@ resource "apstra_template_rack_based" "r" { ### Optional -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. Required for Apstra <= 4.1.0, not supported by Apstra >= 4.1.1. +- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. ### Read-Only