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

google_vertex_ai_endpoint: Cannot determine region #12944

Labels
persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work size/s
Milestone

Comments

@gericdong
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v1.2.7

Affected Resource(s)

google v4.42.0

  • google_vertex_ai_endpoint

Terraform Configuration Files

resource "random_id" "endpoint_id" {
  byte_length = 4
}

resource "google_vertex_ai_endpoint" "main" {
  name         = substr(random_id.endpoint_id.dec, 0, 10)
  display_name = "sample-endpoint"
  description  = "A sample Vertex AI endpoint"
  location     = "us-central1"
  labels = {
    label-one = "value-one"
  }
}

Debug Output

When I didn't set field "region" on the resource level, got error:

│ Error: Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'.

│ with google_vertex_ai_endpoint.main,
│ on main.tf line 21, in resource "google_vertex_ai_endpoint" "main":
│ 21: resource "google_vertex_ai_endpoint" "main" {


When I set field "region" on the resource level, got error:

│ Error: Unsupported argument

│ on main.tf line 26, in resource "google_vertex_ai_endpoint" "main":
│ 26: region = "us-central1"

│ An argument named "region" is not expected here.

Panic Output

Expected Behavior

An endpoint should be created successfully if field "location" is provided on the resource level.

Actual Behavior

Error "Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'." occurred when location field is set. And when setting "region" on the resource level, error "Unsupported argument" occurred.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@gericdong gericdong added the bug label Nov 3, 2022
@edwardmedia edwardmedia self-assigned this Nov 3, 2022
@edwardmedia
Copy link
Contributor

edwardmedia commented Nov 3, 2022

This is a bug. This happens when region and location does not match.

VertexAIBasePath contains {{region}}

To fix, these two fields need to be sync'ed.

@xkobal
Copy link

xkobal commented Nov 29, 2022

HI @edwardmedia , I have the same problem, I'm unable to create an endpoint in a different region from the ressource one.
Bug I need to create and endpoint in europe-west4 and I have the error "The provided location ID doesn't match the endpoint. The valid location ID is europe-west1" which is my default region for my project.

How can I fix this ?

@rileykarson
Copy link
Collaborator

We can introduce a region field and fix this bug without a breaking change, we've supported multiple locations on GKE Instance in the past. Removing location for consistency with the rest of the product would take a breaking change in the future, though.

@rileykarson rileykarson added persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work and removed bug breaking-change labels Mar 1, 2023
@rileykarson rileykarson removed this from the Future Major Release milestone Mar 1, 2023
@rileykarson rileykarson added this to the Goals milestone Mar 6, 2023
@mahvar
Copy link

mahvar commented Apr 5, 2023

Any ETA for this fix?

@mahvar
Copy link

mahvar commented Apr 5, 2023

I understand the workaround is to set the region at provider level, something like this, but since we are creating vertex endpoints in a loop, we are facing lack of support for instantiating provider in a loop. Any advice?

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work size/s
Projects
None yet
5 participants