-
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
Fix import of bigquery transfer config location #8768
Fix import of bigquery transfer config location #8768
Conversation
Hello! I am a robot. It looks like you are a: @roaks3, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Tested the change manually by following: https://googlecloudplatform.github.io/magic-modules/develop/run-tests/#optional-test-manually |
Hello @obada-ab, please, have you noticed if |
Tests analyticsTotal tests: Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccSpannerDatabaseIamPolicy |
Rerun these tests in REPLAYING mode to catch issues
|
Hey @olucasfagundes. I did some testing and both |
@roaks3 can you take a look, thanks |
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.
@obada-ab the issue mentions using import with just the config_id
, so I just want to make sure we aren't breaking any functionality that used to be working. Were you able to verify that this was not possible to use before your fix (ie. all 6 parts were required for import)?
...mplates/terraform/custom_import/bigquery_data_transfer_self_link_as_name_set_location.go.erb
Outdated
Show resolved
Hide resolved
@roaks3 Thanks for taking a look, I tested import with just the config ID but it didn't work. However, importing in the form I'll work on addressing this. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 2 files changed, 18 insertions(+), 4 deletions(-)) |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 2 files changed, 18 insertions(+), 4 deletions(-)) |
Tests analyticsTotal tests:
|
Hmm ok, after a bit more looking, I'm not completely clear on the behavior when a location is not present. It seems as though this Terraform resource treats no location as meaning I think that worst case, we fix the issue when the location is present in the import id, and when it isn't we just make sure we have the same behavior as before. In some sense, the |
@roaks3 I think the API considers having no location in
(notice how
This is true; however, the terraform default of
So the issue still remains. After looking into it, it seems that even when using the short
If there's a way to extract the |
@roaks3 any updates? I think the current changes make sense as they fix the customer issues, and keep the old behaviour for the case where the location is not present while importing. I'm thinking about creating and tracking a separate issue for consistently importing the location. what do you think? |
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.
Yea, I agree. This seems to be a safest set of changes.
When location is not present in the import ID, I think it might technically be more correct to set it to a hardcoded value of US
, but we would need to be careful about what impacts that change would have. Creating a new issue would be great to capture some of those details.
@roaks3 I've created a separate issue: hashicorp/terraform-provider-google#15733 |
…8768) * Fix import of bigquery transfer config location * Fix import of bigquery transfer config when name does not contain location * Fix indentation in bigquery_data_transfer_self_link_as_name_set_location.go.erb
…8768) * Fix import of bigquery transfer config location * Fix import of bigquery transfer config when name does not contain location * Fix indentation in bigquery_data_transfer_self_link_as_name_set_location.go.erb
…8768) * Fix import of bigquery transfer config location * Fix import of bigquery transfer config when name does not contain location * Fix indentation in bigquery_data_transfer_self_link_as_name_set_location.go.erb
…8768) * Fix import of bigquery transfer config location * Fix import of bigquery transfer config when name does not contain location * Fix indentation in bigquery_data_transfer_self_link_as_name_set_location.go.erb
Fix the custom import code for bigquery transfer config, and make it import the location properly.
Fixes hashicorp/terraform-provider-google#12011
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)