Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_bigquery_job - suppress diffs between fully qualified URLs and relative paths that reference the same table or dataset #2107

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3553.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
bigquery: suppressed diffs between fully qualified URLs and relative paths that reference the same table or dataset in `google_bigquery_job`
```
42 changes: 24 additions & 18 deletions google-beta/resource_big_query_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ func resourceBigQueryJob() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
},
Expand Down Expand Up @@ -125,9 +126,10 @@ The BigQuery Service Account associated with your project requires access to thi
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
},
Expand Down Expand Up @@ -253,9 +255,10 @@ Default is ','`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
},
Expand Down Expand Up @@ -317,9 +320,10 @@ or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
},
Expand Down Expand Up @@ -606,9 +610,10 @@ Creation, truncation and append actions occur as one atomic update upon job comp
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"dataset_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The dataset. Can be specified '{{dataset_id}}' if 'project_id' is also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}' if not.`,
},
Expand Down Expand Up @@ -651,9 +656,10 @@ For queries that produce anonymous (cached) results, this field will be populate
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Description: `The table. Can be specified '{{table_id}}' if 'project_id' and 'dataset_id' are also set,
or of the form 'projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}' if not.`,
},
Expand Down