Skip to content

Commit

Permalink
Relax IAM role restrictions on BQ datasets (hashicorp#857)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and danawillow committed Jun 18, 2019
1 parent 646b8a0 commit e4167e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions google-beta/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

0 comments on commit e4167e9

Please sign in to comment.