Skip to content

Commit

Permalink
Add user group to application binding, upgrade 3rd-party imports, gen…
Browse files Browse the repository at this point in the history
…eric cleanup (#12)

* Remove broken tests

* Update module path, license copyright

* Bump `jcapi-go` to latest release

* Bump `testify` to latest release

* Bump `terraform-plugin-sdk` to latest `v1` release

* Remove unused `resourceSystemGroupUserGroupMembership`

* Bump go to 1.20, add indirect go.mod requires, go.sum

* Fix go-staticcheck warnings

* Add `jumpcloud_application` data source, `jumpcloud_user_group_association` resource

* Upgrade to `terraform-plugin-sdk/v2`

* Remove user_group attributes support

* Add missing acceptance tests

* Remove direct testify require

* Implement context passing

* Adjust attribute names for user_group_association, add importer

* Add descriptions for application data_source

* Bump Go version in README, GH action workflow
martinlindner authored Jul 18, 2023
1 parent 2e9f860 commit af260cb
Showing 33 changed files with 753 additions and 706 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.20
-
name: Import GPG key
id: import_gpg
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2018 cognotekt GmbH
Copyright (c) 2023 Enthought, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,22 +3,22 @@
## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 0.13+
- [Go](https://golang.org/doc/install) 1.14 (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.20

## Building The Provider

Clone repository to: `$GOPATH/src/github.com/cognotektgmbh/terraform-provider-jumpcloud`
Clone repository to: `$GOPATH/src/github.com/enthought/terraform-provider-jumpcloud`

```sh
mkdir -p $GOPATH/src/github.com/cognotektgmbh
cd $GOPATH/src/github.com/cognotektgmbh
git clone git@github.com:cognotektgmbh/terraform-provider-jumpcloud
mkdir -p $GOPATH/src/github.com/enthought
cd $GOPATH/src/github.com/enthought
git clone git@github.com:enthought/terraform-provider-jumpcloud
```

Enter the provider directory and build the provider

```sh
cd $GOPATH/src/github.com/cognotektgmbh/terraform-provider-jumpcloud
cd $GOPATH/src/github.com/enthought/terraform-provider-jumpcloud
make build
```

3 changes: 0 additions & 3 deletions examples/system-groups/users.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
resource "jumpcloud_user_group" "test_group" {
name = "test_group"
attributes = {
posix_groups = "32:testerino"
}
}

resource "jumpcloud_user" "test_user1" {
3 changes: 0 additions & 3 deletions examples/user-groups-with-ldap/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
resource "jumpcloud_user_group" "test_group" {
name = "test_group"
attributes = {
posix_groups = "32:testerino"
}
}

resource "jumpcloud_user" "test_user1" {
3 changes: 0 additions & 3 deletions examples/user-groups/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
resource "jumpcloud_user_group" "test_group" {
name = "test_group"
attributes = {
posix_groups = "32:testerino"
}
}

resource "jumpcloud_user" "test_user1" {
60 changes: 55 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,59 @@
module github.com/cognotektgmbh/terraform-provider-jumpcloud
module github.com/enthought/terraform-provider-jumpcloud

go 1.15
go 1.20

require (
github.com/TheJumpCloud/jcapi-go v2.4.0+incompatible
github.com/hashicorp/terraform-plugin-sdk v1.13.1
github.com/stretchr/testify v1.5.1
github.com/TheJumpCloud/jcapi-go v3.0.0+incompatible
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.10 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.5.2 // indirect
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.18.1 // indirect
github.com/hashicorp/terraform-json v0.17.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.16.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.1 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)
Loading

0 comments on commit af260cb

Please sign in to comment.