Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Remote Mock Testing for API Hub Specs fails when deployed to Cloud Run from VS Code: HTTP 412 Error

Hi i am using Cloud Code VS Studio Code Remote Explorer launched through GCP Console.

I have created a Sample Specs for Blog Management as mentioned in the url - Tutorial: Using Gemini Code Assist to design, develop, and test APIs in Apigee and Cloud Code  |  Go... and want to create a mock Cloud Run Service for same.

I am not able to change the region here from VS Studio Code and it's coming as us-central1.

aakashsharmaa5_0-1734001444632.png

When i click deploy button i encounter an error as below (

 ERROR: (gcloud.run.deploy) HTTPError 412: 'us' violates constraint 'constraints/gcp.resourceLocations')

aakashsharmaa5_1-1734001696572.png

I am unable to change the location and when i query Gemini code assist on this issue here is the response (us -multi region is not supported). All this is managed  through internal commands i am stuck. How can i do remote mock testing or if someone has tested this in past let me know.

aakashsharmaa5_2-1734001801859.png

thanks,

Aakash

 

Solved Solved
0 4 395
1 ACCEPTED SOLUTION

Hi @aakashsharmaa5 I have discussed your question with our product team. It looks like from your error  that there is a restriction on your account deploying to the us-central1 region.

  • Unfortunately during public preview we don't allow selection of another region other than us-central1 from the IDE deployment.

If you remove the region restriction (if you are allowed) then it should deploy fine to us-central1.👍

 

 

 

 

View solution in original post

4 REPLIES 4

Hello @aakashsharmaa5, we appreciate you posting this question and your patience as we monitor the conversation. We’re inviting our community members to chime in with their suggestions. Rest assured, we’re here to help you get a response.

Thanks @AlexET 
Hi @aakashsharmaa5 Thanks for your post I will investigate and get back asap. Apologies for the inconvenience and thanks for your patience🙂

Hi @aakashsharmaa5 I have discussed your question with our product team. It looks like from your error  that there is a restriction on your account deploying to the us-central1 region.

  • Unfortunately during public preview we don't allow selection of another region other than us-central1 from the IDE deployment.

If you remove the region restriction (if you are allowed) then it should deploy fine to us-central1.👍

 

 

 

 

thanks @christopherkarl let me check with my infra team.

best regards, Aakash

Top Solution Authors