Open marque2 opened 1 month ago
Hi @marque2!
I noticed a mistake on the google_discovery_engine_chat_engine.location
you are using the value europe-west3
for the location as if it were a region
instead of a location
try to assign the value of 'eu' for this value instead of europe-west3
and see if it works. Example:
resource "google_discovery_engine_chat_engine" "test" {
# some code
location = "eu"
# some code
}
Hi @marque2!
I noticed a mistake on the
google_discovery_engine_chat_engine.location
you are using the valueeurope-west3
for the location as if it were aregion
instead of alocation
try to assign the value of 'eu' for this value instead ofeurope-west3
and see if it works. Example:resource "google_discovery_engine_chat_engine" "test" { # some code location = "eu" # some code }
Hi @ggtisc, thanks for taking a look!
I tried it and successfully deployed it. The problem with this solution is that by setting location = "eu"
we can not control the region and the agent gets deployed on europe-west1
instead of europe-west3
:
The underlying problem of why we need it to be on this particular region is that inside the VertexAI agent we have a connection with a cloud run service deployed on europe-west3
(there is an OpenAPI tool inside the agent with a connection to this cloud run via service directory). This connection only seems to work if both the agent and the cloud run service are in the exact same region:
The agent deployed on europe-west3
manually works perfectly. However, the agent deployed via TF on europe-west1
fails to connect to the cloud run service even when using the exact same configuration (exporting and restoring the agent).
Is there a way to specify the region and not only the location?
Thanks again!
This issue seems like an enhancement since when reviewing the terraform registry documentation and the API in both, it is explicitly mentioned that the configuration is limited to the global, eu and us locations. There isn't much information beyond the links I share and in addition to the fact that by default it only handles 2 regions (us-central -1 and eu-west-1) limiting the possibilities to scenarios like this, which is why I am forwarding this issue as such
Community Note
Terraform Version & Provider Version(s)
Terraform v1.8.3 on linux_amd64
Affected Resource(s)
google_discovery_engine_chat_engine
Terraform Configuration
Debug Output
https://gist.github.com/marque2/df5b06ed20f174dac7cebc9ff4d258fc
Expected Behavior
A VertexAI agent gets created.
Actual Behavior
Terraform raises the following error:
More details on the error on the Debug Output.
Steps to reproduce
terraform apply
Important Factoids
global
andeu
regions.europe-west3
and other regional locations.References
No response
b/376524698