Skip to content

Fix vertex_ai_index_endpoint_deployed_index import without provider region#17477

Open
Shuanglu wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Shuanglu:shuanglu/fix-missing-region-during-import
Open

Fix vertex_ai_index_endpoint_deployed_index import without provider region#17477
Shuanglu wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Shuanglu:shuanglu/fix-missing-region-during-import

Conversation

@Shuanglu
Copy link
Copy Markdown

@Shuanglu Shuanglu commented May 8, 2026

At terraform import time the .tf config is not yet applied to the schema, so d.Get("region") is empty and tpgresource.GetRegion falls through to the provider config. When provider-level region/zone is unset, Read fails with "Cannot determine region" because the URL is templated on {{region}}. Parse region (and project) from the index_endpoint path in the import ID and d.Set them so Read can resolve the URL.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

vertexai: fixed `terraform import` of `google_vertex_ai_index_endpoint_deployed_index` failing with "Cannot determine region" when provider-level `region`/`zone` is unset

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 8, 2026
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Shuanglu Shuanglu force-pushed the shuanglu/fix-missing-region-during-import branch from 4f67e8d to 8d659c8 Compare May 8, 2026 14:24
@Shuanglu Shuanglu marked this pull request as ready for review May 8, 2026 14:33
@github-actions github-actions Bot requested a review from melinath May 8, 2026 14:33
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@melinath, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants