Skip to content

Commit a310fd7

Browse files
google_bigquery_job - suppress diffs between fully qualified URLs and relative paths that reference the same table or dataset (#3553) (#2107)
Signed-off-by: Modular Magician <[email protected]>
1 parent 88a7980 commit a310fd7

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

.changelog/3553.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
bigquery: suppressed diffs between fully qualified URLs and relative paths that reference the same table or dataset in `google_bigquery_job`
3+
```

google-beta/resource_big_query_job.go

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ func resourceBigQueryJob() *schema.Resource {
6464
Elem: &schema.Resource{
6565
Schema: map[string]*schema.Schema{
6666
"table_id": {
67-
Type: schema.TypeString,
68-
Required: true,
69-
ForceNew: true,
67+
Type: schema.TypeString,
68+
Required: true,
69+
ForceNew: true,
70+
DiffSuppressFunc: compareSelfLinkRelativePaths,
7071
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
7172
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
7273
},
@@ -125,9 +126,10 @@ The BigQuery Service Account associated with your project requires access to thi
125126
Elem: &schema.Resource{
126127
Schema: map[string]*schema.Schema{
127128
"table_id": {
128-
Type: schema.TypeString,
129-
Required: true,
130-
ForceNew: true,
129+
Type: schema.TypeString,
130+
Required: true,
131+
ForceNew: true,
132+
DiffSuppressFunc: compareSelfLinkRelativePaths,
131133
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
132134
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
133135
},
@@ -253,9 +255,10 @@ Default is ','`,
253255
Elem: &schema.Resource{
254256
Schema: map[string]*schema.Schema{
255257
"table_id": {
256-
Type: schema.TypeString,
257-
Required: true,
258-
ForceNew: true,
258+
Type: schema.TypeString,
259+
Required: true,
260+
ForceNew: true,
261+
DiffSuppressFunc: compareSelfLinkRelativePaths,
259262
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
260263
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
261264
},
@@ -317,9 +320,10 @@ or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}
317320
Elem: &schema.Resource{
318321
Schema: map[string]*schema.Schema{
319322
"table_id": {
320-
Type: schema.TypeString,
321-
Required: true,
322-
ForceNew: true,
323+
Type: schema.TypeString,
324+
Required: true,
325+
ForceNew: true,
326+
DiffSuppressFunc: compareSelfLinkRelativePaths,
323327
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
324328
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
325329
},
@@ -606,9 +610,10 @@ Creation, truncation and append actions occur as one atomic update upon job comp
606610
Elem: &schema.Resource{
607611
Schema: map[string]*schema.Schema{
608612
"dataset_id": {
609-
Type: schema.TypeString,
610-
Required: true,
611-
ForceNew: true,
613+
Type: schema.TypeString,
614+
Required: true,
615+
ForceNew: true,
616+
DiffSuppressFunc: compareSelfLinkRelativePaths,
612617
Description: `The dataset. Can be specified '{{dataset_id}}' if 'project_id' is also set,
613618
or of the form 'projects/{{project}}/datasets/{{dataset_id}}' if not.`,
614619
},
@@ -651,9 +656,10 @@ For queries that produce anonymous (cached) results, this field will be populate
651656
Elem: &schema.Resource{
652657
Schema: map[string]*schema.Schema{
653658
"table_id": {
654-
Type: schema.TypeString,
655-
Required: true,
656-
ForceNew: true,
659+
Type: schema.TypeString,
660+
Required: true,
661+
ForceNew: true,
662+
DiffSuppressFunc: compareSelfLinkRelativePaths,
657663
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
658664
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
659665
},

0 commit comments

Comments
 (0)