Open duxbuse opened 6 months ago
@duxbuse it works fine for me with below config. Can you try it?
resource "google_service_usage_consumer_quota_override" "override" {
provider = google-beta
project = "myproject"
service = "servicemanagement.googleapis.com"
metric = urlencode("servicemanagement.googleapis.com/default_requests")
limit = urlencode("/min/project")
override_value = "0"
force = true
}
@edwardmedia That snippet you gave runs fine. but the vertex ai quotas do not.
https://github.com/hashicorp/terraform-provider-google/issues/12253
@duxbuse do you have a working script for create / update?
gcloud alpha services quota create / update
Yup this works fine
gcloud alpha services quota create \
--service=aiplatform.googleapis.com --consumer=projects/myproject \
--metric=aiplatform.googleapis.com/online_prediction_requests_per_base_model \
--unit=1/min/{project}/{region}/{base_model} \
--value=0 \
--force
@duxbuse what is the value for {base_model} in your case?
Using below script, I receive the same error COMMON_QUOTA_LIMIT_NOT_FOUND
as from running the terraform script. Until we get the right config, it is hard to say if there is a code issue in the terraform resource.
gcloud alpha services quota create \
--service=aiplatform.googleapis.com --consumer=projects/myproject \
--metric=aiplatform.googleapis.com/online_prediction_requests_per_base_model \
--unit=1/min/myproject/us-central1/gemini-pro-vision \
--value=0 \
--force
its a dimension field. so can be lots of values???
In my use case I want them all, cause I essentially want to disable llm's
@duxbuse I receive the same error buy running example here. Do you have the working gcloud script?
Ohh no the script i sent above is exactly what I ran.
this line was a literal no substitution --unit=1/min/{project}/{region}/{base_model} \
I see. Thank you @duxbuse Below api call is working.
https://serviceusage.googleapis.com/v1beta1/projects/1234567890/services/aiplatform.googleapis.com/consumerQuotaMetrics:importConsumerOverrides?alt=json
{
"force": true,
"inlineSource": {
"overrides": [
{
"metric": "aiplatform.googleapis.com/online_prediction_requests_per_base_model",
"overrideValue": "0",
"unit": "1/min/{project}/{region}/{base_model}"
}
]
}
}
Currently the provider builds this format for the url. The POST body is different too.. We may want to review both.
Hi @edwardmedia any update on this one?
Waiting for update. I got same error as above.
Any update on this one? Waiting for a fix :-)
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
And also getting the same with
Terraform Plan
Output
Expected Behavior
Should have created the quota override
running:
I can see that
unit: 1/min/{project}/{region}/{base_model}
for bothmetric: aiplatform.googleapis.com/generate_content_requests_per_minute_per_project_per_base_model
andmetric: aiplatform.googleapis.com/online_prediction_requests_per_base_model
Steps to Reproduce
terraform apply
Important Factoids
It also doesn't work with any of the below
References
Its likley quite similar to this issue https://github.com/hashicorp/terraform-provider-google/issues/12253 As
aiplatform.googleapis.com
is quite a new api so might behave differently.b/320650559