Open topic with navigation

# Creating the filestore

You can create a filestore through the Google Cloud web UI or the Google Cloud CLI.

## Creation through the Web UI

1. Log in to the Google Cloud console at https://console.cloud.google.com/

2. Click Filestore > Instances > CREATE INSTANCE.

3. Under Name your instance, choose a name for the instance.

4. Under Configure service tier, select an Instance type and a Storage type, as recommended in the Sizing guide.

5. Under Allocate capacity, enter the minimum capacity available in the selected Instance type. See the Sizing guide for guidance.

6. Under Choose where to store your data, select the same region as in the prepared VPC (check the Google Cloud worksheet(add link to worksheet).

7. Under Set up connections > VPC network, select the prepared VPC (check the Google Cloud worksheet(add link to worksheet).

8. Under Configure your file share, choose a name for this file share. You will need the name when accessing NFS data, and therefore you must document it in the Google Cloud worksheet(add link to worksheet).

9. Leave the remaining settings as they are and click CREATE.

## Creation through the CLI

Note: Check the Google Cloud documentation for:

    gcloud filestore instances create

as this command has a lot of different options.

1. Run the following command to create an encrypted EFS file system:

       gcloud filestore instances create <FILESTORE_NAME> --zone=<ZONE> --description="<DESCRIPTION>" --tier=<TIER> --file-share=name=<FILE_SHARE_NAME>,capacity=<SIZE> --network=name=<VPC_NAME>,connect-mode=DIRECT_PEERING

   Where:

   `<FILESTORE_NAME>` is the chosen name or ID for the filestore instance

   `<ZONE>` is the instance compute zone (for example, `us-central1-a`). The value set here overrides the default compute zone property value for this command invocation.

   `<DESCRIPTION>` is an optional description of the network

   `<TIER>` is the service tier for the Cloud Filestore instance, and can have a value of basic-hdd, basic-ssd, enterprise, high-scale-ssd, premium or standard, with a default value of BASIC_HDD. See the Sizing guide for guidance

   `<FILE_SHARE_NAME>` is the logical name of the volume

   `<SIZE>` is the capacity of the volume in `GB` or `TB` units, with `GB` being the default if unspecified. See the Sizing guide for guidance.

   `<VPC_NAME>` is the prepared VPC (check the Google Cloud worksheet(add link to worksheet).

   For example:

       gcloud filestore instances create gcp-arcsight-test-fs --zone=us-central1-a --description="Arcsight Suite NFS" --tier=basic-hdd --file-share=name=arcsight_suite,capacity=1024 --network=name=gcp-arcsight-test,connect-mode=DIRECT_PEERING

   Record the filesystem `<FILE_SHARE_NAME>` value in the Google Cloud worksheet(add link to worksheet).

2. Verify that the filestore is ready by running following command:

       gcloud filestore instances list --filter=name:<FILESTORE_NAME>

   Where:

   `<FILESTORE_NAME>` is the chosen name or ID for the filestore instance

   Example command and output:

       gcloud filestore instances list --filter=name:gcp-arcsight-test

       INSTANCE_NAME: gcp-arcsight-test
       LOCATION: us-central1-a
       TIER: BASIC_HDD
       CAPACITY_GB: 1024
       FILE_SHARE_NAME: arcsight_suite
       IP_ADDRESS: 10.197.224.90
       STATE: READY
       CREATE_TIME: 2023-07-18T19:08:31

   Record the filesystem `IP_ADDRESS` from the output in the Google Cloud worksheet(add link to worksheet)..