Skip to content

Commit b4f81a1

Browse files
authored
Merge pull request #2410 from modular-magician/codegen-pr-691
Change BigQuery access list to a set
2 parents 6dcebca + 1c07767 commit b4f81a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

google/resource_bigquery_dataset.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func resourceBigQueryDataset() *schema.Resource {
113113
// or updating a dataset in order to control who is allowed to access
114114
// the data.
115115
"access": &schema.Schema{
116-
Type: schema.TypeList,
116+
Type: schema.TypeSet,
117117
Optional: true,
118118
// Computed because if unset, BQ adds 4 entries automatically
119119
Computed: true,
@@ -239,7 +239,8 @@ func resourceDataset(d *schema.ResourceData, meta interface{}) (*bigquery.Datase
239239

240240
if v, ok := d.GetOk("access"); ok {
241241
access := []*bigquery.DatasetAccess{}
242-
for _, m := range v.([]interface{}) {
242+
vs := v.(*schema.Set)
243+
for _, m := range vs.List() {
243244
da := bigquery.DatasetAccess{}
244245
accessMap := m.(map[string]interface{})
245246
da.Role = accessMap["role"].(string)

0 commit comments

Comments
 (0)