Skip to content

Add a diffSupressFunc() for template_gcs_path. #13207

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

Merged
merged 22 commits into from
Mar 17, 2025
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
317edc8
Add a diffSupressFunc() for template_gcs_path.
harrisonlimh Feb 26, 2025
a2c98b3
Update resource_dataflow_job.go.tmpl
harrisonlimh Feb 27, 2025
8ea2447
Update resource_dataflow_job.go.tmpl
harrisonlimh Feb 27, 2025
1ecb12d
Add tests
harrisonlimh Feb 27, 2025
cc0a1f4
Update resource_dataflow_job_test.go.tmpl
harrisonlimh Feb 28, 2025
50506bb
Update resource_dataflow_job_test.go.tmpl
harrisonlimh Feb 28, 2025
3344612
Update resource_dataflow_job_test.go.tmpl
harrisonlimh Feb 28, 2025
202b1c5
Update resource_dataflow_job_test.go.tmpl
harrisonlimh Feb 28, 2025
f340dee
Update resource_dataflow_job.go.tmpl
harrisonlimh Feb 28, 2025
bcc00e5
Update resource_dataflow_job_test.go.tmpl
harrisonlimh Mar 5, 2025
2bec9cc
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 13, 2025
6bb4c47
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
c138dcb
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
1a5d25f
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
5c03374
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
b561e15
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
d571478
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
1cef567
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
c21473f
Update resource_dataflow_job.go.tmpl
harrisonlimh Mar 14, 2025
b7fd375
Update mmv1/third_party/terraform/services/dataflow/resource_dataflow…
harrisonlimh Mar 14, 2025
088f432
Update mmv1/third_party/terraform/services/dataflow/resource_dataflow…
harrisonlimh Mar 14, 2025
e6815ad
Update mmv1/third_party/terraform/services/dataflow/resource_dataflow…
shuyama1 Mar 14, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func ResourceDataflowJob() *schema.Resource {
"template_gcs_path": {
Type: schema.TypeString,
Required: true,
DiffSuppressFunc: tpgresource.AlwaysDiffSuppress,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd want to only suppress this specific diff - bucket name adds region suffix, instead of all diffs, as we still need to detect changes for this field.

I don't think we currently have a diff suppress function that can handle this case specifically. You'll need to write a new function yourself, likely named resourceDataflowJobTemplateGcsPathDiffSuppress.

See resourceDataflowJobLabelDiffSuppress function as an example.

old is the value read from the API, like "gs://dataflow-templates-us-central1/latest/Word_Count"
new is what in the config, like "gs://dataflow-templates/latest/Word_Count"
region value could likely be retrieved by d.Get("region")

Please let me know if you have any other questions, thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Done.

Description: `The Google Cloud Storage path to the Dataflow job template.`,
},

Expand Down
Loading