Skip to content

Commit

Permalink
Add iamMember to access for BigQuery dataset (#9288)
Browse files Browse the repository at this point in the history
  • Loading branch information
syou6162 authored Oct 20, 2023
1 parent fc5c17b commit a029ad3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mmv1/products/bigquery/Dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ properties:
* `allAuthenticatedUsers`: All authenticated BigQuery users.
- !ruby/object:Api::Type::String
name: 'iamMember'
description: |
Some other type of member that appears in the IAM Policy but isn't a user,
group, domain, or special group. For example: `allUsers`
- !ruby/object:Api::Type::String
name: 'userByEmail'
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestAccBigQueryDataset_access(t *testing.T) {
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
{
Config: testAccBigQueryDatasetWithTwoAccess(datasetID),
Config: testAccBigQueryDatasetWithThreeAccess(datasetID),
},
{
ResourceName: "google_bigquery_dataset.access_test",
Expand Down Expand Up @@ -504,7 +504,7 @@ resource "google_bigquery_dataset" "access_test" {
`, datasetID)
}

func testAccBigQueryDatasetWithTwoAccess(datasetID string) string {
func testAccBigQueryDatasetWithThreeAccess(datasetID string) string {
return fmt.Sprintf(`
resource "google_bigquery_dataset" "access_test" {
dataset_id = "%s"
Expand All @@ -517,6 +517,10 @@ resource "google_bigquery_dataset" "access_test" {
role = "READER"
domain = "hashicorp.com"
}
access {
role = "READER"
iam_member = "allUsers"
}
labels = {
env = "foo"
Expand Down

0 comments on commit a029ad3

Please sign in to comment.