Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support BigQuery dataset ACLs in absence of IAM endpoints #78

Merged
merged 6 commits into from
Apr 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed unnecessary errwrap
onetwopunch committed Apr 10, 2020

Unverified

This user has not yet uploaded their public signing key.
commit 75c7a70c490b783efafa87192ed153a69807bbc3
7 changes: 4 additions & 3 deletions plugin/iamutil/dataset_resource.go
Original file line number Diff line number Diff line change
@@ -5,9 +5,10 @@ import (
"encoding/json"
"errors"
"fmt"
"strings"

"github.com/hashicorp/errwrap"
"github.com/hashicorp/go-gcp-common/gcputil"
"strings"
)

// NOTE: BigQuery does not conform to the typical REST for IAM policies
@@ -79,11 +80,11 @@ func policyAsDataset(p *Policy) (*Dataset, error) {
}

if p == nil {
onetwopunch marked this conversation as resolved.
Show resolved Hide resolved
return nil, errwrap.Wrap(errors.New("Policy cannot be nil"), nil)
return nil, errors.New("Policy cannot be nil")
}
for _, binding := range p.Bindings {
if binding.Condition != nil {
return nil, errwrap.Wrap(errors.New("Bigquery Datasets do not support conditional IAM"), nil)
return nil, errors.New("Bigquery Datasets do not support conditional IAM")
}
for _, member := range binding.Members {
var email, iamType string