-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make 'region' Argument Optional in Dataflow Configuration #12081
Comments
@fribeiro1 do you set the region in your provider? It is optional if you have the region in the provider. This is common behavior for most resources. |
@edwardmedia Thanks for your quick reply. "region" is optional in the API and should also be optional in the provider. |
@fribeiro1 could you share the api doc that shows the region is optional? |
@edwardmedia The expected behavior when you don't provide a location is described at https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.locations.jobs/create. For example, the CLI, Java, and Python client libraries already implement it. I published samples at https://simplesassim.wordpress.com/2022/07/12/how-to-create-a-job-in-google-dataflow/. |
@fribeiro1 don't you need to provide {location} in the below endpoint? POST https://dataflow.googleapis.com/v1b3/projects/{projectId}/locations/{location}/jobs https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.locations.jobs/create Is this what you referred to when {location} is not provided? It is pretty clear not recommended.
|
@edwardmedia No, you don't. I know it is odd. Still, I think the provider should align with the other tools. |
It is pretty clear other tools may either provide a default {location} or choose the endpoint that is not recommended. It is not common for the provider to provide a default {region} for a resource. Based on that, I am closing this issue. |
@edwardmedia I'm afraid I have to disagree with your evaluation, but I appreciate your attention to the issue. Regards. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.2.4
on linux_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/fribeiro1/195629409cb26f51c133d34f67e66584
Panic Output
N/A.
Expected Behavior
The job is created.
Actual Behavior
The provider requires the optional 'region' argument to create the job.
Steps to Reproduce
terraform apply
Important Factoids
N/A.
References
The text was updated successfully, but these errors were encountered: