Skip to content

Commit 1d21b5f

Browse files
authored
Merge pull request #16 from sumup-oss/add-validation-plan
Add validation during `plan` phase
2 parents 387c3ed + 015bd4b commit 1d21b5f

File tree

16 files changed

+1317
-599
lines changed

16 files changed

+1317
-599
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Test
1212
strategy:
1313
matrix:
14-
golang: ["1.15"]
14+
golang: ["1.16"]
1515
os: ["ubuntu-latest", "macos-latest"]
1616
runs-on: ${{ matrix.os }}
1717
steps:
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/[email protected]
3333

3434
- name: Download golangci-lint
35-
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.8
35+
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.38.0
3636
if: "matrix.os == 'ubuntu-latest'"
3737

3838
- name: Lint

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ dist/
1111
/terraform-provider-vaulted
1212
/terraform-provider-vaulted.exe
1313
/terraform-provider-vaulted.exe~
14+
sandbox/
15+
/mage_output_file.go

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.15.8
1+
1.16.2

.golangci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ linters-settings:
2626
# NOTE: Too-low cyclomatic complexity value
2727
# results into worse code design and readability.
2828
min-complexity: 25
29-
maligned:
30-
suggest-new: true
3129
dupl:
3230
threshold: 100
3331
goconst:
@@ -61,9 +59,24 @@ linters:
6159
- unparam
6260
# NOTE: It's a great linter, but gets in the way too often by not being customizable.
6361
- gochecknoglobals
64-
# NOTE: False positives for values that are only used once in their appropriate places
65-
# or `len(something) > 1` checks.
62+
# NOTE: Full of false positives.
63+
- interfacer
64+
# NOTE: Function length is not an offense.
65+
- funlen
66+
# TODO: Fix false positives
6667
- gomnd
68+
# NOTE: "Packages names should not use underscores" is not a good practice while mixed caps is also disallowed.
69+
- stylecheck
70+
# NOTE: Too verbose
71+
- exhaustivestruct
72+
# NOTE: Worse readability
73+
- nlreturn
74+
# NOTE: False-positives
75+
- nestif
76+
# NOTE: Deprecated
77+
- maligned
78+
# TODO: Enable and fix offences
79+
- goerr113
6780
issues:
6881
exclude-rules:
6982
- text: "weak cryptographic primitive"

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,23 @@ Change line format:
5353

5454
## Unreleased (master)
5555

56+
### Added
57+
58+
* Add validation during `plan` for `vaulted_vault_secret` ; Ref: https://github.com/sumup-oss/terraform-provider-vaulted/pull/16
59+
60+
### Changed
61+
62+
* Updated to Terraform Plugin SDK v2 ; Ref: https://github.com/sumup-oss/terraform-provider-vaulted/pull/16
63+
64+
### Removed
65+
66+
* Removed support for Terraform versions earlier than 0.11 and 0.11 itself ; Ref: https://github.com/sumup-oss/terraform-provider-vaulted/pull/16
67+
5668
## v0.4.3
5769

5870
### Changed
5971

60-
* Build with Golang 1.15.x (1.15.8) ; Ref: https://github.com/sumup-oss/terraform-provider-vaulted/pull/
72+
* Build with Golang 1.15.x (1.15.8) ; Ref: https://github.com/sumup-oss/terraform-provider-vaulted/pull/9
6173

6274
## v0.4.2
6375

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ module github.com/sumup-oss/terraform-provider-vaulted
33
go 1.13
44

55
require (
6-
github.com/hashicorp/terraform v0.12.28
6+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.3
77
github.com/hashicorp/vault v1.4.2
88
github.com/hashicorp/vault/api v1.0.5-0.20200317185738-82f498082f02
99
github.com/magefile/mage v1.8.0
10-
github.com/stretchr/testify v1.5.1
10+
github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177
11+
github.com/stretchr/testify v1.6.1
1112
github.com/sumup-oss/go-pkgs v0.0.0-20200519104547-45b130c89abb
1213
github.com/sumup-oss/vaulted v0.2.1
1314
)

go.sum

Lines changed: 298 additions & 144 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)