-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
does not execute
#6875
Comments
@dboshardy could you post your full debug log? |
I can't post our full log ,but looking at the debug trace, the google api returns a 200 response but the response contains this:
So there's two issues. Looking at the debug trace, while the plan shows Despite the 200 response, IMO this should return an error that the job creation was not successful due to the presence of the |
It looks like I'm not the first to encounter the |
It looks like this line is the culprit [0]. That will always return true for a false boolean value. That means this statement[1] always evaluates to false. So setting [0]https://github.com/terraform-providers/terraform-provider-google/blob/master/google/transport.go#L29 I'd be happy to contribute a PR for this, I'm just not sure about the purpose/utility of |
@dboshardy can you create a job without a destination using a different way? If you can, could you post the steps? Thank you |
Yes, if you use So this is, in fact, 2 issues:
I would expect that if there was an error creating the BQ Job, the terraform resource creation should fail. [0] #6875 (comment) |
I have a fork that fixes these issues [0]. However, it opens up some more issues, primarily:
Fixing this would require detecting DML language in the query and unsetting the defaults, removing them from the request. [0] https://github.com/dboshardy/terraform-provider-google |
After investigating, specifying I've created a PR with my fork @ndmckinley. I've tested and verified that it works for DML statements and that it honors the |
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
Terraform Version
Affected Resource(s)
Terraform Configuration Files (if applicable)
$ terraform --version Terraform v0.12.26 Your version of Terraform is out of date! The latest version is 0.12.29. You can update by downloading from https://www.terraform.io/downloads.html
Issue Description
When creating a query job with no destination, the terraform plan and apply creates the job according to tf log output, but the jobs never show up in the project or personal job history in the BQ UI.
The text was updated successfully, but these errors were encountered: