ERROR: (gcloud.beta.filestore.instances.create) Error parsing [instance]

8/17/2020

I'm running this command to create a filestore in google cloud

gcloud beta filestore instances create devopscube-nfs-server --location=us-central1-c --tier=STANDARD --file-share=name=devopscubefileserver,capacity=1TB --network=name=default,reserved-ip-range=10.0.0.0/29

I'm getting this error : -

ERROR: (gcloud.beta.filestore.instances.create) Error parsing [instance].
The [instance] resource is not properly specified.
Failed to find attribute [project]. The attribute can be set in the following ways: 
- provide the argument [--project] on the command line
- set the property [core/project]
-- Adarsha Jha
gcloud
kubernetes
storage

1 Answer

8/17/2020

The --location flag is deprecated. Use --zone.

You're not logged in to your google cloud account . To login run this command.

gcloud auth login `your-gcloud-email'

After that connect to your project on which you are working. To set project in your terminal using gcloud, run this command :-

gcloud config set project PROJECT-ID
-- Adarsha Jha
Source: StackOverflow