Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.14.0 #39

Merged
merged 43 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
72d5c1b
Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
dependabot[bot] Mar 13, 2024
c217e74
Bump golang.org/x/net from 0.17.0 to 0.23.0
dependabot[bot] Apr 19, 2024
134217e
workflows: bump golangci/golangci-lint-action from 4 to 6
dependabot[bot] May 13, 2024
d3195eb
workflows: bump goreleaser/goreleaser-action from 5.0.0 to 6.0.0
dependabot[bot] Jun 10, 2024
2c2e62f
make provider config user statement mandatory
Jul 24, 2024
37a7957
Merge pull request #28 from moulip/jpa-develop
bsimonWallix Jul 29, 2024
543072b
Merge pull request #24 from wallix/dependabot/github_actions/goreleas…
bsimonWallix Jul 29, 2024
ebffef9
Merge pull request #21 from wallix/dependabot/github_actions/golangci…
bsimonWallix Jul 29, 2024
fa3ed93
Merge pull request #19 from wallix/dependabot/go_modules/golang.org/x…
bsimonWallix Jul 29, 2024
701a719
Merge pull request #16 from wallix/dependabot/go_modules/google.golan…
bsimonWallix Jul 29, 2024
7a77d70
workflows: bump golangci/golangci-lint-action from 4 to 6
dependabot[bot] Jul 29, 2024
92499c4
workflows: bump goreleaser/goreleaser-action from 5.0.0 to 6.0.0
dependabot[bot] Jul 29, 2024
18ad3d6
Merge pull request #29 from wallix/dependabot/github_actions/golangci…
bsimonWallix Jul 30, 2024
dc4473d
Merge pull request #30 from wallix/dependabot/github_actions/goreleas…
bsimonWallix Jul 30, 2024
ff4b0d1
Update release.yml
bsimonWallix Jul 30, 2024
44f208d
Update linters.yml
bsimonWallix Jul 30, 2024
2f05bde
Update go.yml
bsimonWallix Jul 30, 2024
380dc4b
Update linters.yml
bsimonWallix Jul 30, 2024
5c255c3
workflows: bump goreleaser/goreleaser-action from 5.0.0 to 6.0.0
dependabot[bot] Aug 5, 2024
b5652e5
workflows: bump golangci/golangci-lint-action from 4 to 6
dependabot[bot] Aug 5, 2024
3804ae6
workflows: bump crazy-max/ghaction-import-gpg from 6.1.0 to 6.2.0
dependabot[bot] Oct 28, 2024
3c39bb5
workflows: bump golangci-lint to v1.61.0
jeremmfr Nov 5, 2024
8f23067
bump Go version to v1.22 minimum
jeremmfr Nov 5, 2024
e03fef3
fix missing closing bracket in error output of import command
jeremmfr Nov 5, 2024
4544a4d
add compatibility with API version 3.12
jeremmfr Nov 7, 2024
5af0923
update CHANGELOG to declare v0.13.0
jeremmfr Nov 7, 2024
1886906
remove compatibility with API version 3.3 and 3.6
jeremmfr Nov 7, 2024
0b64779
build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 to v2.…
jeremmfr Nov 7, 2024
f056bb4
refactor to use standard package
jeremmfr Nov 7, 2024
4821164
workflows: bump goreleaser-action to v6
jeremmfr Nov 7, 2024
9c5088b
workflows: bump golangci-lint-action to v6
jeremmfr Nov 7, 2024
4671f4b
Merge remote-tracking branch 'origin/feature/api-v3.12' into develop
bsimonWallix Nov 8, 2024
91bf8ef
Fix conflicts
bsimonWallix Nov 8, 2024
f5733fd
Merge pull request #35 from wallix/dependabot/github_actions/crazy-ma…
bsimonWallix Nov 8, 2024
c1c9eb8
Merge pull request #33 from wallix/dependabot/github_actions/golangci…
bsimonWallix Nov 8, 2024
71fc311
Merge pull request #32 from wallix/dependabot/github_actions/goreleas…
bsimonWallix Nov 8, 2024
45b9da9
Added indication regarding API v3.3 and v3.6
bsimonWallix Nov 8, 2024
0aca2c2
docs: user argument is now required for provider configuration
jeremmfr Nov 8, 2024
5f718ee
Merge pull request #37 from wallix/fix-docs-requirement-provider
bsimonWallix Nov 8, 2024
ebb1354
CHANGELOG update to prepare release of v0.14.0
bsimonWallix Nov 8, 2024
696b52d
Merge remote-tracking branch 'origin/develop' into prepare_release
bsimonWallix Nov 8, 2024
d3b27e6
Merge pull request #38 from wallix/prepare_release
bsimonWallix Nov 8, 2024
e05c6bc
File can deleted since the contents are now in CHANGELOG.md
bsimonWallix Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .changes/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions .changes/.template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- markdownlint-disable-file MD013 MD041 -->
FEATURES:

ENHANCEMENTS:

BUG FIXES:
19 changes: 19 additions & 0 deletions .changes/feature_api-v3.12.md
bsimonWallix marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- markdownlint-disable-file MD013 MD041 -->
BREAKING CHANGES:

* remove compatibility with API version 3.3 and 3.6
* remove resource `wallix-bastion_ldapdomain`
* remove resource `wallix-bastion_ldapmapping`
* default provider api_version argument is now `v3.8`

FEATURES:

* add compatibility with API version 3.12

ENHANCEMENTS:

* **resource/wallix-bastion_application**:
* add `category`, `application_url`, `browser`, `browser_version` arguments to be able to add `jumphost` application (not tested)
* `paths` and `target` is now only required when `category` = `standard`
* **resource/wallix-bastion_connection_policy**: add `type` argument with default value as `protocol` value
* **resource/wallix-bastion_externalauth_saml**: add `claim_customization` block argument
23 changes: 13 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Go Tests
on: [push, pull_request]
jobs:
build-1_20:
name: Build 1.20
build-1_22:
name: Build 1.22
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
check-latest: true
cache: false
id: go
- name: Disable cgo
run: |
Expand All @@ -21,15 +22,16 @@ jobs:
- name: Build
run: go build -v .

build-1_21:
name: Build 1.21
build-1_23:
name: Build 1.23
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
check-latest: true
cache: false
id: go
- name: Disable cgo
run: |
Expand All @@ -45,11 +47,12 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
check-latest: true
cache: false
id: go
- name: Disable cgo
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
check-latest: true
id: go
- name: Disable cgo
Expand All @@ -17,10 +17,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.61.0
args: -c .golangci.yml -v
skip-cache: true

markdown-lint:
name: markdown-lint
Expand All @@ -38,11 +39,12 @@ jobs:
name: terrafmt
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
check-latest: true
skip-cache: true
id: go
- name: Show version
run: go version
Expand All @@ -54,6 +56,7 @@ jobs:
repository: katbyte/terrafmt
ref: v0.5.2
path: terrafmt
skip-cache: true
- name: Build terrafmt bin
run: cd terrafmt && go install ./... && cd ${GITHUB_WORKSPACE}
- name: Detect resource/data-source blocks without double quote on type and name (blocks not detected by terrafmt)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
-
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6.1.0
uses: crazy-max/ghaction-import-gpg@v6.2.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5.0.0
uses: goreleaser/goreleaser-action@v6.0.0
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
Expand Down
43 changes: 22 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
run:
timeout: 5m

linters:
enable-all: true
disable:
# maligned # deprecated 1.38.0 but govet-fieldalignment not usuable
- interfacer # deprecated 1.38.0
- scopelint # deprecated 1.39.0
- golint # deprecated 1.41.0
- exhaustivestruct # deprecated 1.46.0
# ifshort # deprecated 1.48.0 but no replacement
- nosnakecase # deprecated 1.48.1
- deadcode # deprecated 1.49.0
- structcheck # deprecated 1.49.0
- varcheck # deprecated 1.49.0
- funlen
# deprecated
- execinquery # deprecated 1.58.0
- gomnd # deprecated 1.58.0
- exportloopref # deprecated 1.60.2
# unwanted
- cyclop
- depguard
- dupl
- wsl
- gomnd
- goerr113
- nestif
- err113
- exhaustruct
- paralleltest
- gci
- cyclop
- forcetypeassert
- tagliatelle
- funlen
- gomoddirectives
- mnd
- nestif
- paralleltest
- tagliatelle
- varnamelen
- depguard
- wsl

linters-settings:
gci:
custom-order: true
sections:
- standard
- localModule
- default
govet:
enable-all: true
disable:
Expand All @@ -39,4 +41,3 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default
min-complexity: 30

3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -40,4 +41,4 @@ signs:
release:
draft: true
changelog:
skip: true
disable: true
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# changelog

## 0.14.0 (November 08, 2024)

BREAKING CHANGES:

* remove compatibility with API version 3.3 and 3.6
* remove resource `wallix-bastion_ldapdomain`
* remove resource `wallix-bastion_ldapmapping`
* default provider api_version argument is now `v3.8`
* user statement is now mandatory

FEATURES:

* add compatibility with API version 3.12

ENHANCEMENTS:

* **resource/wallix-bastion_application**:
* add `category`, `application_url`, `browser`, `browser_version` arguments to be able to add `jumphost` application (not tested)
* `paths` and `target` is now only required when `category` = `standard`
* **resource/wallix-bastion_connection_policy**: add `type` argument with default value as `protocol` value
* **resource/wallix-bastion_externalauth_saml**: add `claim_customization` block argument

## 0.13.0 (March 08, 2024)

* build(deps): bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 by @dependabot in https://github.com/wallix/terraform-provider-wallix-bastion/pull/13
* added http basic authentication by @moulip in https://github.com/wallix/terraform-provider-wallix-bastion/pull/15

## 0.12.2 (January 03, 2024)

* Corrected and added documentation example
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### In addition to develop

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

### Special Thanks

Expand Down
8 changes: 4 additions & 4 deletions bastion/data_source_configoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"encoding/json"
"fmt"
"net/http"
"slices"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
balt "github.com/jeremmfr/go-utils/basicalter"
bchk "github.com/jeremmfr/go-utils/basiccheck"
)

type jsonConfigOptions struct {
Expand Down Expand Up @@ -57,7 +57,7 @@ func dataSourceConfigoption() *schema.Resource {
}

func dataSourceConfigoptionVersionCheck(version string) error {
if bchk.InSlice(version, defaultVersionsValid()) {
if slices.Contains(defaultVersionsValid(), version) {
return nil
}

Expand Down Expand Up @@ -94,7 +94,7 @@ func readConfigoption(
for _, v := range optionsList {
params += v.(string) + ","
}
_ = balt.CutPrefixInString(&params, ",")
params = strings.TrimSuffix(params, ",")
}
body, code, err := c.newRequest(ctx, "/configoptions/"+d.Get("config_id").(string)+params, http.MethodGet, nil)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions bastion/data_source_configoption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bastion_test

import (
"encoding/json"
"fmt"
"errors"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down Expand Up @@ -30,7 +30,7 @@ func TestAccDataSourceConfigoption_basic(t *testing.T) {
return err
}
if jsonData["name"].(string) != "one_time_password_ttl" {
return fmt.Errorf("can't find name=one_time_password_ttl in json")
return errors.New("can't find name=one_time_password_ttl in json")
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions bastion/data_source_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package bastion
import (
"context"
"fmt"
"slices"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
bchk "github.com/jeremmfr/go-utils/basiccheck"
)

func dataSourceDomain() *schema.Resource {
Expand Down Expand Up @@ -54,7 +54,7 @@ func dataSourceDomain() *schema.Resource {
}

func dataSourceDomainVersionCheck(version string) error {
if bchk.InSlice(version, defaultVersionsValid()) {
if slices.Contains(defaultVersionsValid(), version) {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions bastion/data_source_local_password_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"encoding/json"
"fmt"
"net/http"
"slices"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
bchk "github.com/jeremmfr/go-utils/basiccheck"
)

type jsonLocalPasswordPolicy struct {
Expand Down Expand Up @@ -97,7 +97,7 @@ func dataSourceLocalPasswordPolicy() *schema.Resource {
}

func dataSourceLocalPasswordPolicyVersionCheck(version string) error {
if bchk.InSlice(version, defaultVersionsValid()) {
if slices.Contains(defaultVersionsValid(), version) {
return nil
}

Expand Down
Loading
Loading