Reputation: 115
I've been using Google Cloud endpoints recently with no issues on an old project id. Now I've created a new project id, but when it comes to deploying my old endpoint definitions (openapi.yaml), I keep on getting permission denied errors. Note that I've followed all the auth guides, and created the GKE cluster and deployed my docker containers successfully, but only creating the endpoints is failing.
These are the contents of the openapi.yaml:
type: google.api.Service
config_version: 3
name: myendpoints.endpoints.my-project-id.cloud.goog
title: Hello gRPC API
apis:
- name: helloworld.Greeter
The command I use to deploy this is:
gcloud service-management deploy openapi.yaml --log-http --verbosity=debug
The output of the verbose logs is just too much to print, but the important snippet is at the end:
HttpError: HttpError accessing <https://servicemanagement.googleapis.com/v1/services/myendpoints.endpoints.my-project-id.cloud.goog?alt=json>: response: <{'status': '403', 'content-length': '179', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 09 Apr 2017 22:55:53 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="37,36,35"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 403,
"message": "Service 'myendpoints.endpoints.my-project-id.cloud.goog' not found or permission denied.",
"status": "PERMISSION_DENIED"
}
}
>
Please note that 'my-project-id' has been replaced in my commands, but just replaced here for illustration purposes.
Has anyone come across this issue before, and if so, how was it overcome? Things I've tried:
This are the commands I run when swapping between projects:
> gcloud config set project <project-id>
> gcloud auth login
> gcloud auth application-default login
Again, creating any other resource works, it's just Google Cloud Endpoints failing with a 403.
The region I'm using is: "asia-northeast1-a", and I'm using the owner account to perform these tasks.
Upvotes: 0
Views: 1330
Reputation: 115
Well this was a strange issue to start with, and the solution seems to be more strange. Approx. 12 hours after I created the new project, it started to accept my requests to create a cloud endpoint.
I didn't really do anything to solve it. Not sure how or why, maybe there was another issue at play (on Google's side) ?
So far, I tried again with a new project and had the same issue so it seems that you can't immediately create new google cloud endpoints immediately after creating a project, but after 12+ hours after(?). Any explanations would be appreciated.
Upvotes: 1