Skip to content

Commit fc3ed8c

Browse files
Merge pull request #47 from pluralsh/marcin/prod-2461-add-ability-to-manage-groups-via-plural-terraform-provider
feat: Group management
2 parents b1b9553 + d20e1af commit fc3ed8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+666
-423
lines changed

example/gitrepository/main.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
terraform {
2+
required_providers {
3+
plural = {
4+
source = "pluralsh/plural"
5+
version = "0.2.1"
6+
}
7+
}
8+
}
9+
10+
provider "plural" {
11+
use_cli = true
12+
}
13+
14+
data "plural_cluster" "cluster" {
15+
handle = "mgmt"
16+
}
17+
18+
data "plural_git_repository" "repository" {
19+
url = "https://github.com/zreigz/tf-hello.git"
20+
}
21+
22+
resource "plural_git_repository" "repository" {
23+
url = "https://github.com/zreigz/tf-hello.git"
24+
}

example/globalservice/main.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
terraform {
2+
required_providers {
3+
plural = {
4+
source = "pluralsh/plural"
5+
version = "0.2.1"
6+
}
7+
}
8+
}
9+
10+
provider "plural" {
11+
use_cli = true
12+
}
13+
14+
resource "plural_global_service" "guestbook" {
15+
name = "guestbook"
16+
service_id = "624bff88-05e3-45f6-bc3b-44708594e28e"
17+
distro = "AKS"
18+
}

example/user/main.tf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
terraform {
2+
required_providers {
3+
plural = {
4+
source = "pluralsh/plural"
5+
version = "0.2.1"
6+
}
7+
}
8+
}
9+
10+
provider "plural" {
11+
use_cli = true
12+
}
13+
14+
data "plural_config" "config" {}
15+
16+
data "plural_user" "user" {
17+
18+
}
19+
20+
data "plural_group" "group" {
21+
name = "team"
22+
}
23+
24+
resource "plural_group" "test" {
25+
name = "test"
26+
description = "test group"
27+
}
28+
29+
resource "plural_rbac" "rbac" {
30+
service_id = "624bff88-05e3-45f6-bc3b-44708594e28e"
31+
bindings = {
32+
read = [{
33+
user_id = data.plural_user.user.id
34+
}]
35+
write = [{
36+
user_id = data.plural_user.user.id
37+
}]
38+
}
39+
}

go.mod

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
module terraform-provider-plural
22

3-
go 1.22
3+
go 1.22.4
44

5-
toolchain go1.22.0
5+
toolchain go1.22.5
66

77
require (
8-
github.com/Yamashou/gqlgenc v0.18.1
8+
github.com/Yamashou/gqlgenc v0.23.2
99
github.com/golangci/golangci-lint v1.55.1
1010
github.com/hashicorp/terraform-plugin-docs v0.16.0
1111
github.com/hashicorp/terraform-plugin-framework v1.4.2
1212
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
1313
github.com/hashicorp/terraform-plugin-log v0.9.0
1414
github.com/mitchellh/go-homedir v1.1.0
15-
github.com/pluralsh/console-client-go v0.8.0
15+
github.com/pluralsh/console/go/client v1.2.0
1616
github.com/pluralsh/plural-cli v0.8.5-0.20240216094552-efc34ee6de37
1717
github.com/pluralsh/polly v0.1.7
1818
github.com/samber/lo v1.38.1
@@ -29,7 +29,7 @@ require (
2929
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
3030
4d63.com/gochecknoglobals v0.2.1 // indirect
3131
github.com/4meepo/tagalign v1.3.3 // indirect
32-
github.com/99designs/gqlgen v0.17.43 // indirect
32+
github.com/99designs/gqlgen v0.17.49 // indirect
3333
github.com/Abirdcfly/dupword v0.0.13 // indirect
3434
github.com/AlecAivazis/survey/v2 v2.3.5 // indirect
3535
github.com/Antonboom/errname v0.1.12 // indirect
@@ -80,7 +80,7 @@ require (
8080
github.com/curioswitch/go-reassign v0.2.0 // indirect
8181
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
8282
github.com/daixiang0/gci v0.11.2 // indirect
83-
github.com/davecgh/go-spew v1.1.1 // indirect
83+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
8484
github.com/denis-tingaikin/go-header v0.4.3 // indirect
8585
github.com/docker/cli v20.10.21+incompatible // indirect
8686
github.com/docker/distribution v2.8.2+incompatible // indirect
@@ -239,8 +239,9 @@ require (
239239
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
240240
github.com/pjbgf/sha1cd v0.3.0 // indirect
241241
github.com/pkg/errors v0.9.1 // indirect
242+
github.com/pluralsh/console-client-go v0.0.92 // indirect
242243
github.com/pluralsh/gqlclient v1.11.0 // indirect
243-
github.com/pmezard/go-difflib v1.0.0 // indirect
244+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
244245
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
245246
github.com/posener/complete v1.2.3 // indirect
246247
github.com/prometheus/client_golang v1.15.1 // indirect
@@ -270,7 +271,7 @@ require (
270271
github.com/sivchari/tenv v1.7.1 // indirect
271272
github.com/skeema/knownhosts v1.1.0 // indirect
272273
github.com/sonatard/noctx v0.0.2 // indirect
273-
github.com/sosodev/duration v1.2.0 // indirect
274+
github.com/sosodev/duration v1.3.1 // indirect
274275
github.com/sourcegraph/go-diff v0.7.0 // indirect
275276
github.com/spf13/afero v1.9.5 // indirect
276277
github.com/spf13/cast v1.5.0 // indirect
@@ -280,8 +281,8 @@ require (
280281
github.com/spf13/viper v1.15.0 // indirect
281282
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
282283
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
283-
github.com/stretchr/objx v0.5.0 // indirect
284-
github.com/stretchr/testify v1.8.4 // indirect
284+
github.com/stretchr/objx v0.5.2 // indirect
285+
github.com/stretchr/testify v1.9.0 // indirect
285286
github.com/subosito/gotenv v1.4.2 // indirect
286287
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
287288
github.com/tdakkota/asciicheck v0.2.0 // indirect
@@ -293,7 +294,7 @@ require (
293294
github.com/ultraware/funlen v0.1.0 // indirect
294295
github.com/ultraware/whitespace v0.0.5 // indirect
295296
github.com/uudashr/gocognit v1.1.2 // indirect
296-
github.com/vektah/gqlparser/v2 v2.5.11 // indirect
297+
github.com/vektah/gqlparser/v2 v2.5.16 // indirect
297298
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
298299
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
299300
github.com/xanzy/ssh-agent v0.3.3 // indirect
@@ -315,22 +316,22 @@ require (
315316
go.uber.org/goleak v1.2.1 // indirect
316317
go.uber.org/multierr v1.8.0 // indirect
317318
go.uber.org/zap v1.24.0 // indirect
318-
golang.org/x/crypto v0.16.0 // indirect
319+
golang.org/x/crypto v0.24.0 // indirect
319320
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
320321
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
321-
golang.org/x/mod v0.13.0 // indirect
322-
golang.org/x/net v0.19.0 // indirect
322+
golang.org/x/mod v0.18.0 // indirect
323+
golang.org/x/net v0.26.0 // indirect
323324
golang.org/x/oauth2 v0.8.0 // indirect
324-
golang.org/x/sync v0.4.0 // indirect
325-
golang.org/x/sys v0.17.0 // indirect
326-
golang.org/x/term v0.17.0 // indirect
327-
golang.org/x/text v0.14.0 // indirect
325+
golang.org/x/sync v0.7.0 // indirect
326+
golang.org/x/sys v0.21.0 // indirect
327+
golang.org/x/term v0.21.0 // indirect
328+
golang.org/x/text v0.16.0 // indirect
328329
golang.org/x/time v0.3.0 // indirect
329-
golang.org/x/tools v0.14.0 // indirect
330+
golang.org/x/tools v0.22.0 // indirect
330331
google.golang.org/appengine v1.6.7 // indirect
331332
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
332333
google.golang.org/grpc v1.57.0 // indirect
333-
google.golang.org/protobuf v1.31.0 // indirect
334+
google.golang.org/protobuf v1.34.1 // indirect
334335
gopkg.in/inf.v0 v0.9.1 // indirect
335336
gopkg.in/ini.v1 v1.67.0 // indirect
336337
gopkg.in/warnings.v0 v0.1.2 // indirect
@@ -357,6 +358,7 @@ require (
357358
)
358359

359360
replace (
361+
github.com/Yamashou/gqlgenc => github.com/Yamashou/gqlgenc v0.18.1
360362
go.etcd.io/etcd/pkg/v3 => go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0
361363
k8s.io/cli-runtime => k8s.io/cli-runtime v0.26.4
362364
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596

0 commit comments

Comments
 (0)