gcloud 명령어로 organization 관련 cli 수행 시, accesscontextmanager.googleapis.com의 SERVICE_DISABLED 에러가 발생할 수 있다.

보통 아래와 유사하게 에러가 발생한다.

이와 같은 에러가 발생하는 경우 gcloud project 설정을 해줘야한다.

oraganization(조직) 설정 변경 건인데, project 설정을 해야하는 이유는 알 수는 없지만 설정이 필요하다.

Google Cloud는 항상 이런식이였으니..

ERROR: (gcloud.access-context-manager.levels.create) User [ ] does not have permission to access accessPolicies instance [ ] (or it may not exist):

Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the accesscontextmanager.googleapis.com.

We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.

If you are getting this error with curl or similar tools, you may need to specify 'X-Goog-User-Project' HTTP header for quota and billing purposes.

For more information regarding 'X-Goog-User-Project' header, please check https://cloud.google.com/apis/docs/system-parameters.

- '@type': type.googleapis.com/google.rpc.ErrorInfo

domain: googleapis.com

metadata:

consumer: projects/11111111

service: accesscontextmanager.googleapis.com

reason: SERVICE_DISABLED

 

다음과 같이 Project를 설정해주고 다시 수행하면 된다.

gcloud config set project ${PROJECT_ID}

 

참고자료: https://zenn.dev/taruki/articles/acm-setting-knowledge