Skip to content

Commit

Permalink
Merge pull request #550 from jeremmfr/main
Browse files Browse the repository at this point in the history
Release v2.2.0
  • Loading branch information
jeremmfr authored Sep 13, 2023
2 parents 9ba8ca4 + ee6d28d commit d50457f
Show file tree
Hide file tree
Showing 101 changed files with 10,191 additions and 6,345 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: List resource files and Test Website Files exists
run: |
missing=""
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Go Tests
on: [push, pull_request]
jobs:
build-1_19:
name: Build 1.19
build-1_20:
name: Build 1.20
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.20'
check-latest: true
id: go
- name: Disable cgo
Expand All @@ -17,18 +17,18 @@ jobs:
- name: Show version
run: go version
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
run: go build -v .

build-1_20:
name: Build 1.20
build-1_21:
name: Build 1.21
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
id: go
- name: Disable cgo
Expand All @@ -37,18 +37,18 @@ jobs:
- name: Show version
run: go version
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
run: go build -v .

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
id: go
- name: Disable cgo
Expand All @@ -57,6 +57,6 @@ jobs:
- name: Show version
run: go version
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Test
run: go test -v ./...
6 changes: 3 additions & 3 deletions .github/workflows/go_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
actions: read
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Running govulncheck
uses: Templum/[email protected]
with:
go-version: '1.20'
go-version: '1.21'
package: ./...
fail-on-vuln: false

Expand All @@ -28,7 +28,7 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/linters-main.yml

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
id: go
- name: Disable cgo
run: |
echo "CGO_ENABLED=0" >> $GITHUB_ENV
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
version: 'v1.54.2'
args: -c .golangci.yml -v

markdown-lint:
name: markdown-lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Markdown files linting
uses: avto-dev/markdown-lint@v1
Expand All @@ -38,18 +38,18 @@ jobs:
name: terrafmt
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
id: go
- name: Show version
run: go version
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check out terrafmt code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: katbyte/terrafmt
ref: v0.5.2
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: diff SingleNestedBlock and BlockRemoveNull
working-directory: ./internal/providerfwk
run: diff <( grep 'schema.SingleNestedBlock{' -c * ) <( grep 'BlockRemoveNull()' -c *)
10 changes: 5 additions & 5 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
id: ${{steps.create_release.outputs.id}}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set env RELEASE_VERSION
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF} | cut -d'/' -f3)" >> $GITHUB_ENV
- name: Create Release
Expand All @@ -38,16 +38,16 @@ jobs:
- goos: windows
goarch: arm64
steps:
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '^1.20.4'
go-version: '^1.21.1'
check-latest: true
id: go
- name: Show version
run: go version
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set env
run: |
echo "CGO_ENABLED=0" >> $GITHUB_ENV
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install utils
run: |
sudo apt update
Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ linters:
- nosnakecase
- musttag
- depguard
- gosec
linters-settings:
gci:
custom-order: true
Expand Down Expand Up @@ -59,9 +60,6 @@ linters-settings:
- shadow
issues:
exclude-rules:
- text: "Use of ssh InsecureIgnoreHostKey"
linters:
- gosec
- text: "github.com/jeremmfr/terraform-provider-junos/internal"
linters:
- wrapcheck
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
<!-- markdownlint-disable-file MD013 MD041 -->
# changelog

## v2.2.0 (September 13, 2023)

ENHANCEMENTS:

* **resource/junos_interface_physical**: add `trunk_non_els` and `vlan_native_non_els` arguments (Fix [#521](https://github.com/jeremmfr/terraform-provider-junos/issues/521))
* **data-source/junos_interface_physical**: add `trunk_non_els` and `vlan_native_non_els` attributes
* **resource/junos_aggregate_route**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
optional boolean attributes doesn't accept value *false*
optional string attributes doesn't accept *empty* value
* **resource/junos_generate_route**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
optional boolean attributes doesn't accept value *false*
optional string attributes doesn't accept *empty* value
* **resource/junos_static_route**: 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
* **data-source/junos_routes**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
* **resource/junos_security_nat_destination**: 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 string attributes doesn't accept *empty* value
the resource schema has been upgraded to have one-blocks in single mode instead of list
* **resource/junos_security_nat_destination_pool**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
optional string attributes doesn't accept *empty* value
* **resource/junos_security_nat_source**: 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 string attributes doesn't accept *empty* value
the resource schema has been upgraded to have one-blocks in single mode instead of list
* **resource/junos_security_nat_source_pool**: resource now use new [terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework)
optional string attributes doesn't accept *empty* value
* **resource/junos_security_nat_static**: 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 string attributes doesn't accept *empty* value
optional boolean attributes doesn't accept value *false*
the resource schema has been upgraded to have one-blocks in single mode instead of list
* **resource/junos_security_nat_static_rule**: 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 string attributes doesn't accept *empty* value
the resource schema has been upgraded to have one-blocks in single mode instead of list
* release now with golang 1.21

## v2.1.3 (August 30, 2023)

BUG FIXES:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for provider and resources documentation.

### In addition to develop

- [Go](https://golang.org/doc/install) `v1.19` or `v1.20`
- [Go](https://golang.org/doc/install) `v1.20` or `v1.21`

## Automatic install

Expand Down
7 changes: 7 additions & 0 deletions docs/data-sources/interface_physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,17 @@ The following attributes are exported:
Link speed.
- **trunk** (Boolean)
Interface mode is trunk.
- **trunk_non_els** (Boolean)
Port mode is trunk.
When use `port-mode` instead of `interface-mode` on non-ELS devices.
- **vlan_members** (List of String)
List of vlan membership for this interface.
- **vlan_native** (Number)
Vlan for untagged frames.
- **vlan_native_non_els** (String)
Vlan for untagged frames.
When use `native-vlan-id` in `unit 0 family ethernet-switching`
instead of interface root level on non-ELS devices.
- **vlan_tagging** (Boolean)
802.1q VLAN tagging support.

Expand Down
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ The following arguments are supported in the `provider` block:
- **sshkey_pem** (Optional, String)
This is the ssh key in PEM format for establish ssh connection.
It can also be sourced from the `JUNOS_KEYPEM` environment variable.
Defaults is empty.
Defaults to empty.

- **sshkeyfile** (Optional, String)
This is the path to ssh key for establish ssh connection.
Used only if `sshkey_pem` is empty.
It can also be sourced from the `JUNOS_KEYFILE` environment variable.
Defaults is empty.
Defaults to empty.

- **password** (Optional, String)
This is a password for ssh connection.
It can also be sourced from the `JUNOS_PASSWORD` environment variable.
Defaults is empty.
Defaults to empty.

- **port** (Optional, Number)
This is the tcp port for ssh connection.
Expand All @@ -105,7 +105,7 @@ The following arguments are supported in the `provider` block:
- **keypass** (Optional, String)
This is the passphrase for open `sshkeyfile` or `sshkey_pem`.
It can also be sourced from the `JUNOS_KEYPASS` environment variable.
Defaults is empty.
Defaults to empty.

- **group_interface_delete** (Optional, String)
This is the Junos group used to remove configuration on a physical interface.
Expand Down Expand Up @@ -177,7 +177,7 @@ The following arguments are supported in the `provider` block:
- **debug_netconf_log_path** (Optional, String)
More detailed log (netconf) in the specified file.
It can also be sourced from the `JUNOS_LOG_PATH` environment variable.
Defaults is empty.
Defaults to empty.

~> **NOTE:** If this option is used (not empty), all Junos commands are logged in this file,
therefore there may be sensitive data in plain text in the file.
Expand Down Expand Up @@ -208,7 +208,7 @@ The following arguments are supported in the `provider` block:

It can also be sourced from the `JUNOS_FAKECREATE_SETFILE` environment
variable.
Defaults is empty.
Defaults to empty.

~> **NOTE:** If this option is used (not empty), all Junos commands are added to this file,
therefore there may be sensitive data in plain text in the file.
Expand All @@ -229,7 +229,7 @@ The following arguments are supported in the `provider` block:

It can also be sourced from the `JUNOS_FAKEUPDATE_ALSO` environment variable and
its value is `true`.
Defaults is `false`.
Defaults to `false`.

- **fake_delete_also** (Optional, Boolean, **don't use in normal terraform run**)
As with `create` and `fake_create_with_setfile`, when this option is true, the normal
Expand All @@ -245,7 +245,7 @@ The following arguments are supported in the `provider` block:

It can also be sourced from the `JUNOS_FAKEDELETE_ALSO` environment variable and
its value is `true`.
Defaults is `false`.
Defaults to `false`.

## Interface specifications

Expand Down
Loading

0 comments on commit d50457f

Please sign in to comment.