From 892ebcc7473aafa2a88f5a9084ae0b4640f7b062 Mon Sep 17 00:00:00 2001 From: danischm Date: Tue, 3 Sep 2024 09:54:43 +0200 Subject: [PATCH] Fix value range of ttl attribute --- CHANGELOG.md | 4 ++++ docs/guides/changelog.md | 4 ++++ docs/resources/bgp_peer.md | 2 +- gen/definitions/bgp_peer.yaml | 2 +- internal/provider/resource_nxos_bgp_peer.go | 4 ++-- templates/guides/changelog.md.tmpl | 4 ++++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e28c0d19..5a6d083a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.6 (unreleased) + +- Fix value range of `ebgp_multihop_ttl` attribute of `nxos_bgp_peer` resource + ## 0.5.5 - Fix importing of resources diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 59a46ddf..aa2c5131 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.5.6 (unreleased) + +- Fix value range of `ebgp_multihop_ttl` attribute of `nxos_bgp_peer` resource + ## 0.5.5 - Fix importing of resources diff --git a/docs/resources/bgp_peer.md b/docs/resources/bgp_peer.md index 9ec1f391..a720f3c4 100644 --- a/docs/resources/bgp_peer.md +++ b/docs/resources/bgp_peer.md @@ -67,7 +67,7 @@ resource "nxos_bgp_peer" "example" { - `description` (String) Peer description. - `device` (String) A device name from the provider configuration. - `ebgp_multihop_ttl` (Number) eBGP Multihop TTL - - Range: `2`-`255` + - Range: `0`-`255` - `hold_time` (Number) BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range: `3`-`3600` - Default value: `180` diff --git a/gen/definitions/bgp_peer.yaml b/gen/definitions/bgp_peer.yaml index 56ba82da..30f67a3c 100644 --- a/gen/definitions/bgp_peer.yaml +++ b/gen/definitions/bgp_peer.yaml @@ -85,7 +85,7 @@ attributes: type: Int64 description: "eBGP Multihop TTL" example: 5 - min_int: 2 + min_int: 0 max_int: 255 omit_empty_value: true - nxos_name: ctrl diff --git a/internal/provider/resource_nxos_bgp_peer.go b/internal/provider/resource_nxos_bgp_peer.go index 2d9b0ddb..599a0714 100644 --- a/internal/provider/resource_nxos_bgp_peer.go +++ b/internal/provider/resource_nxos_bgp_peer.go @@ -139,10 +139,10 @@ func (r *BGPPeerResource) Schema(ctx context.Context, req resource.SchemaRequest }, }, "ebgp_multihop_ttl": schema.Int64Attribute{ - MarkdownDescription: helpers.NewAttributeDescription("eBGP Multihop TTL").AddIntegerRangeDescription(2, 255).String, + MarkdownDescription: helpers.NewAttributeDescription("eBGP Multihop TTL").AddIntegerRangeDescription(0, 255).String, Optional: true, Validators: []validator.Int64{ - int64validator.Between(2, 255), + int64validator.Between(0, 255), }, }, "peer_control": schema.StringAttribute{ diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 59a46ddf..aa2c5131 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.5.6 (unreleased) + +- Fix value range of `ebgp_multihop_ttl` attribute of `nxos_bgp_peer` resource + ## 0.5.5 - Fix importing of resources