Skip to content

Commit 80eb678

Browse files
Add validation for target_types in google_bigquery_dataset_access (#15446) (#10932)
[upstream:5eb5357f26f75b3d220fea45a5a6c18a52588af6] Signed-off-by: Modular Magician <[email protected]>
1 parent 94921e0 commit 80eb678

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changelog/15446.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
bigquery: added validation for `target_types` in `google_bigquery_dataset_access`
3+
```

google-beta/services/bigquery/resource_bigquery_dataset_access.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232

3333
"github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgresource"
3434
transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport"
35+
"github.com/hashicorp/terraform-provider-google-beta/google-beta/verify"
3536
)
3637

3738
var bigqueryAccessRoleToPrimitiveMap = map[string]string{
@@ -258,7 +259,8 @@ This can be used e.g. in UIs which allow to enter the expression.`,
258259
Description: `Which resources in the dataset this entry applies to. Currently, only views are supported,
259260
but additional target types may be added in the future. Possible values: VIEWS`,
260261
Elem: &schema.Schema{
261-
Type: schema.TypeString,
262+
Type: schema.TypeString,
263+
ValidateFunc: verify.ValidateRegexp(`^[A-Z_]+$`),
262264
},
263265
},
264266
},

0 commit comments

Comments
 (0)