GCP {account_id} get value of project_id #7409
-
In GCP, how do you use account_id to get project name Following https://cloudcustodian.io/docs/quickstart/advanced.html?highlight=account_id
Getting value
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
account_id is the project name for gcp, its picked up via environment variable for c7n (CLOUDSDK_CORE_PROJECT) per gcloud cli/sdk, and via config in c7n-org |
Beta Was this translation helpful? Give feedback.
-
[UPDATE: Issue resolved] Hi, I've run into the same issue and am unable to resolve this. Any feedback is appreciated. Policy
Custodian Version
The output of [compute]
region = us-west1
zone = us-west1-b
[core]
account = xxxxxxx
disable_usage_reporting = False
project = my_project_id Checked to see if I exported the right env vars. env | grep PROJECT
GOOGLE_CLOUD_PROJECT=my_project_id
CLOUDSDK_CORE_PROJECT=my_project_id |
Beta Was this translation helpful? Give feedback.
I can confirm that this worked in c7n-org. Please ignore this (updated my original message).
c7n-org config