Skip to content

Commit

Permalink
Change resource format of looker_group_membership (#10)
Browse files Browse the repository at this point in the history
* change group membership interface and fix acc test

* add how to run acc test on README

* update doc

* fix ci
  • Loading branch information
hirosassa authored Nov 7, 2021
1 parent f3ddeb9 commit a7ac460
Show file tree
Hide file tree
Showing 15 changed files with 496 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
-
name: Import GPG key
id: import_gpg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Checkout
uses: actions/checkout@v2

Expand Down
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ This is a terraform provider plugin for managing [Looker](https://www.looker.com

## Install

### For Terraform v0.13+ users

You can use [Explicit Provider Source Locations](https://www.terraform.io/upgrade-guides/0-13.html#explicit-provider-source-locations).

```terraform
Expand All @@ -22,3 +20,28 @@ terraform {
## Usage

In-depth docs are available [on the Terraform registry](https://registry.terraform.io/providers/hirosassa/looker/latest).


## For developers

### How to run acceptance test

Before running acceptance test, you should set following environment variables:

```shell
export LOOKER_API_CLIENT_ID=YOUR_CLIENT_ID
export LOOKER_API_CLIENT_SECRET=YOUR_CLIENT_SECRET
export LOOKER_API_BASE_URL="https://example.com/"
```

Then run following command:

```shell
TF_ACC=1 go test ./...
```

or you can also use

```shell
make test-acceptance
```
5 changes: 3 additions & 2 deletions docs/resources/group_membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ resource "looker_group_membership" "group_membership" {

### Required

- **group_id** (String)
- **user_id** (String)
- **group_ids** (Set of Number)
- **target_group_id** (Number)
- **user_ids** (Set of Number)

### Optional

Expand Down
78 changes: 75 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,89 @@
module github.com/hirosassa/terraform-provider-looker

go 1.16
go 1.17

require (
github.com/aws/aws-sdk-go v1.34.28 // indirect
github.com/hashicorp/terraform-plugin-docs v0.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0
github.com/looker-open-source/sdk-codegen/go v0.0.1
github.com/stretchr/testify v1.7.0
)

require github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect

require (
cloud.google.com/go v0.65.0 // indirect
cloud.google.com/go/storage v1.10.0 // indirect
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.37.0 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // 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-getter v1.5.3 // indirect
github.com/hashicorp/go-hclog v0.15.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.14.0 // indirect
github.com/hashicorp/terraform-json v0.12.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.3.0 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/klauspost/compress v1.11.2 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mitchellh/cli v1.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.1 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/stretchr/testify v1.7.0
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.8.4 // indirect
go.opencensus.io v0.22.4 // indirect
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.34.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect
google.golang.org/grpc v1.32.0 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/ini.v1 v1.61.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
Loading

0 comments on commit a7ac460

Please sign in to comment.