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_iam_policy doesn't expect the argument "region" #21026

Open
zinizhu opened this issue Jan 23, 2025 · 1 comment
Open

Comments

@zinizhu
Copy link

zinizhu commented Jan 23, 2025

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 a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform: v1.5.7

  • provider registry.terraform.io/hashicorp/google v6.17.0
  • provider registry.terraform.io/hashicorp/google-beta v6.17.0

Affected Resource(s)

google_vertex_ai_endpoint_iam_policy

Terraform Configuration

First we tried:

resource "google_vertex_ai_endpoint_iam_policy" "policy" {
  provider = google-beta
  project  = google_vertex_ai_endpoint.endpoint.project

  location    = google_vertex_ai_endpoint.endpoint.location
  endpoint    = google_vertex_ai_endpoint.endpoint.name
  policy_data = data.google_iam_policy.endpoint_caller.policy_data
}

And this gave us:

╷
│ Error: Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'.
│ 
│   with module.vertex_endpoints["my-model"].google_vertex_ai_endpoint_iam_policy.policy,
│   on .terraform/modules/vertex_endpoints/vertexai/endpoint_psc/main.tf line 23, in resource "google_vertex_ai_endpoint_iam_policy" "policy":
│   23: resource "google_vertex_ai_endpoint_iam_policy" "policy" {
│ 
╵

Then, we tried

  1. replace location with region
  2. set both location and region with the same value

Both gave us:

│ Error: Unsupported argument
│ 
│   on xxxx/endpoint_psc/main.tf line 29, in resource "google_vertex_ai_endpoint_iam_policy" "policy":
│   29:   region      = google_vertex_ai_endpoint.endpoint.location
│ 
│ An argument named "region" is not expected here.
╵

Debug Output

No response

Expected Behavior

The resource accepts either location or region as the input.

Actual Behavior

TF keeps complaining no matter what region/location I specify.

Steps to reproduce

See above.

Important Factoids

No response

References

No response

b/392108635

@zinizhu zinizhu added the bug label Jan 23, 2025
@ggtisc ggtisc added service/aiplatform-prediction forward/review In review; remove label to forward labels Jan 24, 2025
@ggtisc ggtisc self-assigned this Jan 24, 2025
@ggtisc
Copy link
Collaborator

ggtisc commented Jan 24, 2025

Confirmed issue!

terraform registry specifies the region argument is possible to be set (link here), but even trying to declare it before creation shows the following message:

Unexpected attribute: An attribute named "region" is not expected here

@ggtisc ggtisc removed their assignment Jan 24, 2025
@ggtisc ggtisc removed the forward/review In review; remove label to forward label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants