Skip to content

Commit b593457

Browse files
authored
Fix role order bug (#21)
* Change to tofu * Updated packages and Go * Changed user roles from list to set * Also set of mechanisms * Fix mechanisms field * Updated GH Action * Added missing license header * Added missing install * Dont run tests twice * Fixed version
1 parent 46b10c1 commit b593457

File tree

9 files changed

+115
-67
lines changed

9 files changed

+115
-67
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
paths-ignore:
1414
- 'README.md'
1515
push:
16+
branches:
17+
- main
1618
paths-ignore:
1719
- 'README.md'
1820

@@ -47,6 +49,9 @@ jobs:
4749
with:
4850
go-version-file: 'go.mod'
4951
cache: true
52+
- uses: opentofu/setup-opentofu@v1
53+
with:
54+
tofu_wrapper: false
5055
- run: go generate ./...
5156
- name: git diff
5257
run: |
@@ -63,22 +68,18 @@ jobs:
6368
fail-fast: false
6469
matrix:
6570
# list whatever Terraform versions here you would like to support
66-
terraform:
67-
- '1.0.*'
68-
- '1.1.*'
69-
- '1.2.*'
70-
- '1.3.*'
71-
- '1.4.*'
71+
tofu:
72+
- '1.6.0-alpha5'
7273
steps:
7374
- uses: actions/checkout@v4
7475
- uses: actions/setup-go@v4
7576
with:
7677
go-version-file: 'go.mod'
7778
cache: true
78-
- uses: hashicorp/setup-terraform@v3
79+
- uses: opentofu/setup-opentofu@v1
7980
with:
80-
terraform_version: ${{ matrix.terraform }}
81-
terraform_wrapper: false
81+
tofu_version: ${{ matrix.tofu }}
82+
tofu_wrapper: false
8283
- run: go mod download
8384
- env:
8485
TF_ACC: "1"

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-FileCopyrightText: 2023 Risk.Ident GmbH <[email protected]>
2+
//
3+
// SPDX-License-Identifier: CC0-1.0
4+
{
5+
"cSpell.words": [
6+
"datasource",
7+
"listvalidator",
8+
"planmodifier",
9+
"setvalidator",
10+
"stringplanmodifier",
11+
"stringvalidator",
12+
"tflog",
13+
"tfsdk"
14+
]
15+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ To run the tests, run `make test`.
3030

3131
### Development requirements
3232

33-
- [Terraform](https://www.terraform.io/downloads.html) >= 1.0
34-
- [Go](https://golang.org/doc/install) >= 1.20
33+
- [Tofu](https://opentofu.org/docs/intro/install) >= 1.6.0-alpha1
34+
- [Go](https://golang.org/doc/install) >= 1.21
3535

3636
### Building The Provider
3737

docs/resources/mongodb_user.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ resource "mongodb_user" "example" {
100100
### Optional
101101

102102
- `custom_data` (Map of String) Any custom data for this user. Map of string key and values of arbitrary values.
103-
- `mechanisms` (List of String) Authentication mechanisms this user can use.
103+
- `mechanisms` (Set of String) Authentication mechanisms this user can use.
104104

105105
- The default for featureCompatibilityVersion `4.0` is both `SCRAM-SHA-1` and `SCRAM-SHA-256`.
106106
- The default for featureCompatibilityVersion `3.6` is `SCRAM-SHA-1`.
107-
- `roles` (Attributes List) Roles this user belongs to. (see [below for nested schema](#nestedatt--roles))
107+
- `roles` (Attributes Set) Roles this user belongs to. (see [below for nested schema](#nestedatt--roles))
108108
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
109109

110110
### Read-Only

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module github.com/RiskIdent/terraform-provider-mongodb-driver
66

7-
go 1.20
7+
go 1.21.4
88

99
require (
1010
github.com/hashicorp/terraform-plugin-docs v0.16.0
@@ -24,30 +24,30 @@ require (
2424
github.com/armon/go-radix v1.0.0 // indirect
2525
github.com/bgentry/speakeasy v0.1.0 // indirect
2626
github.com/cloudflare/circl v1.3.3 // indirect
27-
github.com/fatih/color v1.15.0 // indirect
27+
github.com/fatih/color v1.16.0 // indirect
2828
github.com/golang/protobuf v1.5.3 // indirect
2929
github.com/golang/snappy v0.0.4 // indirect
30-
github.com/google/uuid v1.3.0 // indirect
30+
github.com/google/uuid v1.3.1 // indirect
3131
github.com/hashicorp/errwrap v1.1.0 // indirect
3232
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
3333
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
3434
github.com/hashicorp/go-hclog v1.5.0 // indirect
3535
github.com/hashicorp/go-multierror v1.1.1 // indirect
36-
github.com/hashicorp/go-plugin v1.5.1 // indirect
36+
github.com/hashicorp/go-plugin v1.6.0 // indirect
3737
github.com/hashicorp/go-uuid v1.0.3 // indirect
3838
github.com/hashicorp/go-version v1.6.0 // indirect
3939
github.com/hashicorp/hc-install v0.5.2 // indirect
4040
github.com/hashicorp/terraform-exec v0.18.1 // indirect
4141
github.com/hashicorp/terraform-json v0.17.1 // indirect
42-
github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect
43-
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
42+
github.com/hashicorp/terraform-plugin-go v0.19.1 // indirect
43+
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
4444
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
4545
github.com/hashicorp/yamux v0.1.1 // indirect
4646
github.com/huandu/xstrings v1.3.2 // indirect
4747
github.com/imdario/mergo v0.3.13 // indirect
48-
github.com/klauspost/compress v1.16.7 // indirect
48+
github.com/klauspost/compress v1.17.3 // indirect
4949
github.com/mattn/go-colorable v0.1.13 // indirect
50-
github.com/mattn/go-isatty v0.0.19 // indirect
50+
github.com/mattn/go-isatty v0.0.20 // indirect
5151
github.com/mitchellh/cli v1.1.5 // indirect
5252
github.com/mitchellh/copystructure v1.2.0 // indirect
5353
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
@@ -58,21 +58,21 @@ require (
5858
github.com/russross/blackfriday v1.6.0 // indirect
5959
github.com/shopspring/decimal v1.3.1 // indirect
6060
github.com/spf13/cast v1.5.0 // indirect
61-
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
61+
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
6262
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
6363
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
6464
github.com/xdg-go/scram v1.1.2 // indirect
6565
github.com/xdg-go/stringprep v1.0.4 // indirect
6666
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
6767
github.com/zclconf/go-cty v1.13.2 // indirect
68-
golang.org/x/crypto v0.14.0 // indirect
68+
golang.org/x/crypto v0.15.0 // indirect
6969
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
7070
golang.org/x/mod v0.11.0 // indirect
71-
golang.org/x/net v0.17.0 // indirect
72-
golang.org/x/sync v0.3.0 // indirect
73-
golang.org/x/sys v0.13.0 // indirect
74-
golang.org/x/text v0.13.0 // indirect
75-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230724170836-66ad5b6ff146 // indirect
76-
google.golang.org/grpc v1.57.1 // indirect
71+
golang.org/x/net v0.18.0 // indirect
72+
golang.org/x/sync v0.5.0 // indirect
73+
golang.org/x/sys v0.14.0 // indirect
74+
golang.org/x/text v0.14.0 // indirect
75+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
76+
google.golang.org/grpc v1.59.0 // indirect
7777
google.golang.org/protobuf v1.31.0 // indirect
7878
)

0 commit comments

Comments
 (0)