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

Support IAM roles on BigQuery datasets #3451

Merged
merged 5 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 2 additions & 4 deletions google/resource_bigquery_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"regexp"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"google.golang.org/api/bigquery/v2"
)

Expand Down Expand Up @@ -138,9 +137,8 @@ func resourceBigQueryDataset() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"role": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"OWNER", "WRITER", "READER"}, false),
Type: schema.TypeString,
Optional: true,
},
"domain": {
Type: schema.TypeString,
Expand Down
7 changes: 5 additions & 2 deletions website/docs/r/bigquery_dataset.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ The `access` block supports the following fields (exactly one of `domain`,
even though they are marked optional):

* `role` - (Required unless `view` is set) Describes the rights granted to
the user specified by the other member of the access object. The following
string values are supported: `READER`, `WRITER`, `OWNER`.
the user specified by the other member of the access object.
Primitive, Predefined and custom roles are supported.
Predefined roles that have equivalent primitive roles are swapped
by the API to their Primitive counterparts, and will show a diff post-create.
See [official docs](https://cloud.google.com/bigquery/docs/access-control).

* `domain` - (Optional) A domain to grant access to.

Expand Down