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

Fix invalid assumptions about Project ID's in BQ table #3486

Merged
merged 1 commit into from
May 3, 2019
Merged

Fix invalid assumptions about Project ID's in BQ table #3486

merged 1 commit into from
May 3, 2019

Conversation

KJTsanaktsidis
Copy link
Contributor

The bigquery table resource tries to infer the project and dataset from the table's full name. However, it does so incorrectly as it assumes that the project ID cannot have : or . characters in it, yet both are valid.

This is leading to errors like this for me when I run terraform plan:

* module.bigquery.google_bigquery_table.connect_product_analytics_table_user_search_filters: 1 error(s) occurred:

* module.bigquery.google_bigquery_table.connect_product_analytics_table_user_search_filters: google_bigquery_table.connect_product_analytics_table_user_search_filters: Invalid BigQuery table specifier. Expecting {project}:{dataset-id}.{table-id}, got outbound.io:outbound:connect_product_analytics_experiment.user_search_filters

As you can see, our project ID is outbound.io:outbound, so the string-splitting algorithm here doesn't work.

When using this branch, the plan works correctly.

Also - I'm targeting the PR against master, but we're actually still using the 1.20 version of the provider. Is there any way this fix can get backported to the 1.x series as well?

The bigquery table resource tries to infer the project and dataset from
the table's full name. However, it does so incorrectly as it assumes
that the project ID cannot have : or . characters in it, yet both are
valid.
@ghost ghost added the size/xs label Apr 24, 2019
@KJTsanaktsidis
Copy link
Contributor Author

Any chance of getting some 👀 on this soon? The fact that this resource is in our statefile breaks planning for our entire team (unless they're running a fork of the provider)

Copy link
Collaborator

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

Thanks @KJTsanaktsidis! Sorry about the delay. I'll duplicate this up to our code generator, Magic Modules, so it hits google-beta as well and then merge this PR.

I don't believe we're able to backport the change unfortunately. Out of curiosity, what's blocking you from advancing to a 2.X series release?

@KJTsanaktsidis
Copy link
Contributor Author

Hey, thanks for this. The main thing blocking us upgrading to a 2.x release is we are using the bigtable resources in a deprecated way that’ll need to be fixed (drawing a proper distinction between instances and clusters). I need to spend some time to have a good look at how yo upgrade it without accidentally deleting our cluster :)

@rileykarson
Copy link
Collaborator

rileykarson commented May 6, 2019

Fair enough! It's also always an option to use multiple provider instances at different versions, although I personally wouldn't recommend that with more than 1-2 resources ahead or behind the rest.

@ghost
Copy link

ghost commented Jun 3, 2019

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants