Basically what the title states. I'll be replacing the service name with 'xyzservice' and the region name with 'xyzregion' but everything else is exactly as is.
I have a firebase hosting app where I want to access a service running on Google Cloud Run. As per documentation, I'm using a rewrite rule:
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/api/**",
"run": {
"serviceId": xyzservice,
"region": xyzregion
}
},
{
"source": "**",
"function": "app"
}
]
}
}
I can confirm that I see xyzservice is part of my project when I run gcloud beta run services list
Despite this I keep getting this error:
HTTP Error: 400, Cloud Run service xyzservice does not exist in region xyzregion in this project.
I can't seem to find any information about this error online. Anyone know how I might resolve this?
Thanks in advance!
400
indicates that probably something on your code is not correct. Checking the documentation on integrating Cloud Run and Firebase Hosting - this one here - it seems different from what you are doing. Considering that, could you please confirm if the documentation you are following is this same one? If so, could you try this troubleshooting guide, to gather more information from what is causing the error you are seeing? – gso_gabrielCloud Run service xyzservice does not exist in region xyzregion in this project.
Redeploy your Cloud Run service in the correct region. – John Hanley