-
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
Add time partitioning field to google_bigquery_table resource #1240
Add time partitioning field to google_bigquery_table resource #1240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a test (or updating an existing one) to use the new field?
google/resource_bigquery_table.go
Outdated
@@ -428,6 +440,11 @@ func expandTimePartitioning(configured interface{}) *bigquery.TimePartitioning { | |||
|
|||
func flattenTimePartitioning(tp *bigquery.TimePartitioning) []map[string]interface{} { | |||
result := map[string]interface{}{"type": tp.Type} | |||
result["field"] = tp.Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be tp.Field?
@danawillow I have fix |
Thanks! Yeah I think having it in
|
Hi @danawillow Changes done. |
Hey @amatellanes, I'm not sure if you were intending to have the test update the existing table, but by having the two steps in the same test that's what it tried to do. It sounds like from this error message that you can't update that field. If that's true, can you make it
|
I've just marked the field as |
028f719
to
192bf31
Compare
c840110
to
15c6b51
Compare
I would just modify |
Finally I've chosen to modify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ make testacc TEST=./google TESTARGS='-run=TestAccBigQueryTable_Basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google -v -run=TestAccBigQueryTable_Basic -timeout 120m
=== RUN TestAccBigQueryTable_Basic
=== PAUSE TestAccBigQueryTable_Basic
=== CONT TestAccBigQueryTable_Basic
--- PASS: TestAccBigQueryTable_Basic (5.52s)
PASS
ok github.com/terraform-providers/terraform-provider-google/google 5.753s
Thanks @amatellanes! Looks good!
…orp#1240) * Add time partitioning field to google_bigquery_table resource * Fix flatten time partitioning field to google_bigquery_table resource * Add resource bigquery table time partitioning field test * Move resource bigquery table time partitioning field test to basic * Add step to check that all the fields match * Mark resource bigquery table time partitioning field as ForceNew * Add time partitioning field test to testAccBigQueryTable config
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Add time partitioning field to google_bigquery_table resource. This field is available on type
TimePartitioning
from packagebigquery
: