Skip to content

Commit

Permalink
Merge pull request #680 from jeremmfr/main
Browse files Browse the repository at this point in the history
Release v2.8.0
  • Loading branch information
jeremmfr authored Jun 27, 2024
2 parents 8f6519d + 190e6ed commit 4499d2c
Show file tree
Hide file tree
Showing 172 changed files with 6,649 additions and 5,526 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
uses: golangci/golangci-lint-action@v6
with:
version: 'v1.57.1'
version: v1.59.1
args: -c .golangci.yml -v

markdown-lint:
Expand Down
46 changes: 20 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
run:
timeout: 5m

linters:
enable-all: true
disable:
- maligned # deprecated 1.38
- interfacer # deprecated 1.38
- scopelint # deprecated 1.39
- golint # deprecated 1.41
- exhaustivestruct # deprecated 1.46
- ifshort # deprecated 1.48
- deadcode # deprecated 1.49
- structcheck # deprecated 1.49
- varcheck # deprecated 1.49
- funlen
# deprecated
- execinquery # deprecated 1.58.0
- gomnd # deprecated 1.58.0
# unwanted
- cyclop
- depguard
- dupl
- wsl
- gomnd
- goerr113
- nestif
- err113
- exhaustruct
- paralleltest
- cyclop
- forcetypeassert
- funlen
- gomoddirectives
- varnamelen
- nonamedreturns
- maintidx
- execinquery
- nosnakecase
- musttag
- depguard
- gosec
- inamedparam
- ireturn
- maintidx
- mnd
- musttag
- nestif
- nonamedreturns
- paralleltest
- varnamelen
- wsl

linters-settings:
gci:
custom-order: true
sections:
- standard
- prefix(github.com/jeremmfr/terraform-provider-junos/)
- localModule
- default
gocognit:
# minimal code complexity to report, 30 by default
Expand All @@ -52,8 +47,6 @@ linters-settings:
# minimal code complexity to report, 30 by default
min-complexity: 100
gofumpt:
module-path: github.com/jeremmfr/terraform-provider-junos
# Choose whether to use the extra rules.
extra-rules: true
govet:
enable-all: true
Expand Down Expand Up @@ -91,6 +84,7 @@ linters-settings:
- name: import-alias-naming
- name: import-shadowing
- name: unhandled-error

issues:
exclude-rules:
- text: "github.com/jeremmfr/terraform-provider-junos/internal"
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
<!-- markdownlint-disable-file MD013 MD041 -->
# changelog

## v2.8.0 (2024-06-27)

ENHANCEMENTS:

* **resource/junos_bridge_domain**: add `static_remote_vtep_list` argument inside `vxlan` block argument (Fix [#672](https://github.com/jeremmfr/terraform-provider-junos/issues/672))
* **resource/junos_interface_logical**: add `encapsulation` argument (Fix [#674](https://github.com/jeremmfr/terraform-provider-junos/issues/674))
* **data-source/junos_interface_logical**: add `encapsulation` attribute like resource
* **resource/junos_routing_instance**: add `remote_vtep_list` and `remote_vtep_v6_list` arguments (Fix [#673](https://github.com/jeremmfr/terraform-provider-junos/issues/673))
* **data-source/junos_routing_instance**: add `remote_vtep_list` and `remote_vtep_v6_list` attributes like resource
* **resource/junos_rstp**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
* **resource/junos_rstp_interface**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
* **resource/junos_security_log_stream**:
* resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
optional string attributes doesn't accept *empty* value
the resource schema has been upgraded to have one-blocks in single mode instead of list
* add `transport` block argument (Fix [#675](https://github.com/jeremmfr/terraform-provider-junos/issues/675))
* **resource/junos_switch_options**: add `remote_vtep_list` and `remote_vtep_v6_list` arguments
* **resource/junos_vlan**: add `static_remote_vtep_list` argument inside `vxlan` block argument
* **resource/junos_vstp**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
* **resource/junos_vstp_interface**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
* **resource/junos_vstp_vlan**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*
* **resource/junos_vstp_vlan_group**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
some of config errors are now sent during Plan instead of during Apply
optional boolean attributes doesn't accept value *false*

## v2.7.0 (2024-05-03)

FEATURES:
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/interface_logical.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ The following attributes are exported:
Description for interface.
- **disable** (Boolean)
Interface disabled.
- **encapsulation** (String)
Logical link-layer encapsulation.
- **family_inet** (Block)
Family inet enabled and possible configuration.
- **address** (Block List)
Expand Down
4 changes: 4 additions & 0 deletions docs/data-sources/routing_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ The following attributes are exported:
Import policy for instance RIBs.
- **interface** (Set of String)
List of interfaces in routing instance.
- **remote_vtep_list** (Set of String)
Static remote VXLAN tunnel endpoints.
- **remote_vtep_v6_list** (Set of String)
Static ipv6 remote VXLAN tunnel endpoints.
- **route_distinguisher** (String)
Route distinguisher for this instance.
- **router_id** (String)
Expand Down
6 changes: 4 additions & 2 deletions docs/resources/bridge_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The following arguments are supported:
Declare vxlan options.
- **vni** (Required, Number)
VXLAN identifier (0..16777214).
- **vni_extend_evpn** (Optional, Boolean)
Extend VNI to EVPN.
- **decapsulate_accept_inner_vlan** (Optional, Boolean)
Accept VXLAN packets with inner VLAN.
- **encapsulate_inner_vlan** (Optional, Boolean)
Expand All @@ -65,10 +67,10 @@ The following arguments are supported:
CIDR for Multicast group registered for VXLAN segment.
- **ovsdb_managed** (Optional, Boolean)
Bridge-domain is managed remotely via VXLAN OVSDB Controller.
- **static_remote_vtep_list** (Optional, Set of String)
Configure bridge domain specific static remote VXLAN tunnel endpoints.
- **unreachable_vtep_aging_timer** (Optional, Number)
Unreachable VXLAN tunnel endpoint removal timer (300..1800 seconds).
- **vni_extend_evpn** (Optional, Boolean)
Extend VNI to EVPN.

## Attribute Reference

Expand Down
2 changes: 2 additions & 0 deletions docs/resources/interface_logical.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The following arguments are supported:
Description for interface.
- **disable** (Optional, Boolean)
Disable this logical interface.
- **encapsulation** (Optional, String)
Logical link-layer encapsulation.
- **family_inet** (Optional, Block)
Enable family inet and add configurations if specified.
- **address** (Optional, Block List)
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/routing_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ The following arguments are supported:
Export policy for instance RIBs.
- **instance_import** (Optional, List of String)
Import policy for instance RIBs.
- **remote_vtep_list** (Optional, Set of String)
Configure static remote VXLAN tunnel endpoints.
- **remote_vtep_v6_list** (Optional, Set of String)
Configure static ipv6 remote VXLAN tunnel endpoints.
- **route_distinguisher** (Optional, String)
Route distinguisher for this instance.
- **router_id** (Optional, String)
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/rstp.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following arguments are supported:
- **backup_bridge_priority** (Optional, String)
Priority of the bridge (in increments of 4k - 4k,8k,..60k).
- **bpdu_block_on_edge** (Optional, Boolean)
Block BPDU on all interfaces configured as edge (BPDU Protect)
Block BPDU on all interfaces configured as edge (BPDU Protect).
- **bpdu_destination_mac_address_provider_bridge_group** (Optional, Boolean)
Destination MAC address in the spanning tree BPDUs is 802.1ad provider bridge group address.
- **bridge_priority** (Optional, String)
Expand All @@ -40,7 +40,7 @@ The following arguments are supported:
- **extended_system_id** (Optional, Number)
Extended system identifier (0..4095).
- **force_version_stp** (Optional, Boolean)
Force protocol version stp.
Force protocol version STP.
- **forward_delay** (Optional, Number)
Time spent in listening or learning state (4..30 seconds).
- **hello_time** (Optional, Number)
Expand Down
9 changes: 9 additions & 0 deletions docs/resources/security_log_stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ The following arguments are supported:
Rate-limit for security logs.
- **severity** (Optional, String)
Severity threshold for security logs.
- **transport** (Optional, Block)
Set security log transport settings.
- **protocol** (Optional, String)
Set security log transport protocol for the device.
Need to be `tcp`, `tls` or `udp`.
- **tcp_connections** (Optional, Number)
Set tcp connection number per-stream (1..5).
- **tls_profile** (Optional, String)
TLS profile.

## Attribute Reference

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/switch_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ The following arguments are supported:

- **clean_on_destroy** (Optional, Boolean)
Clean supported lines when destroy this resource.
- **remote_vtep_list** (Optional, Set of String)
Configure static remote VXLAN tunnel endpoints.
- **remote_vtep_v6_list** (Optional, Set of String)
Configure static ipv6 remote VXLAN tunnel endpoints.
- **service_id** (Optional, Number)
Service ID required if multi-chassis AE is part of a bridge-domain (1..65535).
- **vtep_source_interface** (Optional, String)
Expand Down
6 changes: 4 additions & 2 deletions docs/resources/vlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ The following arguments are supported:
Declare vxlan configuration.
- **vni** (Required, Number)
VXLAN identifier (0..16777214).
- **vni_extend_evpn** (Optional, Boolean)
Extend VNI to EVPN.
- **encapsulate_inner_vlan** (Optional, Boolean)
Retain inner VLAN in the packet.
- **ingress_node_replication** (Optional, Boolean)
Expand All @@ -68,10 +70,10 @@ The following arguments are supported:
Multicast group registered for VXLAN segment.
- **ovsdb_managed** (Optional, Boolean)
Bridge-domain is managed remotely via VXLAN OVSDB Controller.
- **static_remote_vtep_list** (Optional, Set of String)
Configure vlan specific static remote VXLAN tunnel endpoints.
- **translation_vni** (Optional, Number)
Translated VXLAN identifier (1..16777214).
- **vni_extend_evpn** (Optional, Boolean)
Extend VNI to EVPN.
- **unreachable_vtep_aging_timer** (Optional, Number)
Unreachable VXLAN tunnel endpoint removal timer (300..1800 seconds).

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/vstp.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ The following arguments are supported:
Need to be `default` (for root level) or the name of routing instance.
Defaults to `default`.
- **bpdu_block_on_edge** (Optional, Boolean)
Block BPDU on all interfaces configured as edge (BPDU Protect)
Block BPDU on all interfaces configured as edge (BPDU Protect).
- **disable** (Optional, Boolean)
Disable STP.
- **force_version_stp** (Optional, Boolean)
Force protocol version stp.
Force protocol version STP.
- **priority_hold_time** (Optional, Number)
Hold time before switching to primary priority when core domain becomes up (1..255 seconds).
- **system_id** (Optional, Block Set)
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/vstp_vlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ The following arguments are supported:
Need to be `default` (for root level) or name of routing instance.
Defaults to `default`.
- **backup_bridge_priority** (Optional, String)
Priority of the bridge (in increments of 4k - 4k,8k,..60k) (4096..61440).
Priority of the bridge (in increments of 4k - 4k,8k,..60k).
- **bridge_priority** (Optional, String)
Priority of the bridge (in increments of 4k - 0,4k,8k,..60k) (0..61440).
Priority of the bridge (in increments of 4k - 0,4k,8k,..60k).
- **forward_delay** (Optional, Number)
Time spent in listening or learning state (4..30 seconds).
- **hello_time** (Optional, Number)
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/vstp_vlan_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ The following arguments are supported:
Need to be `default` (for root level) or name of routing instance.
Defaults to `default`.
- **vlan** (Required, Set of String)
VLAN IDs or VLAN ID ranges [1..4094].
VLAN IDs or VLAN ID ranges (1..4094).
- **backup_bridge_priority** (Optional, String)
Priority of the bridge (in increments of 4k - 4k,8k,..60k) (4096..61440).
Priority of the bridge (in increments of 4k - 4k,8k,..60k).
- **bridge_priority** (Optional, String)
Priority of the bridge (in increments of 4k - 0,4k,8k,..60k) (0..61440).
Priority of the bridge (in increments of 4k - 0,4k,8k,..60k).
- **forward_delay** (Optional, Number)
Time spent in listening or learning state (4..30 seconds).
- **hello_time** (Optional, Number)
Expand Down
37 changes: 19 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ go 1.21.0
require (
github.com/google/go-cmp v0.6.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-framework v1.8.0
github.com/hashicorp/terraform-plugin-framework v1.9.0
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.22.2
github.com/hashicorp/terraform-plugin-mux v0.15.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-mux v0.16.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
github.com/hashicorp/terraform-plugin-testing v1.7.0
github.com/hashicorp/terraform-plugin-testing v1.8.0
github.com/jeremmfr/go-netconf v0.5.0
github.com/jeremmfr/go-utils v0.12.0
github.com/jeremmfr/junosdecode v1.1.1
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.24.0
)

require (
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
Expand All @@ -27,16 +27,16 @@ require (
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.3 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/hc-install v0.6.4 // indirect
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
Expand All @@ -52,16 +52,17 @@ require (
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.34.0 // indirect
)

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/jeremmfr/terraform-plugin-sdk/v2 v2.33.1-0.20240302165942-47aab524cbd3
Loading

0 comments on commit 4499d2c

Please sign in to comment.