See @saigeetha-sundar correct reply.
However, it appears that you have set the Project ID using gcloud config set core/project
. The intent of the gcloud config set
command is to set default values for gcloud
properties so that you do not need to write them repeatedly (as you wish).
Just to be clear:
If the core/project
value is unset...
gcloud config unset core/project
If you don't specify --project=[[YOUR-PROJECT]]
on commands that expect it, you'll get errors...
NOTE I'm using gcloud iam service-accounts list
as an example.
gcloud iam service-accounts list
ERROR: The required property [project] is not currently set.
You may set it for your current workspace by running:
$ gcloud config set project VALUE
or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]
And you must always specify it, e.g.:
gcloud iam service-accounts list --project=[[YOUR-PROJECT]]
DISPLAY NAME EMAIL
Default compute service account [email protected]
But, if you set the configuration value:
gcloud config set core/project [[YOUR-PROJECT]]
Then any command that requires the project value will work without specifying it:
gcloud iam service-accounts list
DISPLAY NAME EMAIL
Default compute service account [email protected]