> [!NOTE]
> **Note:**
>
> Filestore agent volumes are available under an Allowlisted GA (AGA)
> program. To request access for your Google Cloud project, submit the
> Filestore agent volumes
> [access request form](https://forms.gle/vYPkcFiZVoTjf7Ah7).
>
> The Agent Substrate integration with Filestore agent volumes is in Preview and doesn't support automation
> for Filestore volume snapshots, cloning, or data tiering.

Before you create volume pools or provision volumes, whether you plan to deploy
workloads on Google Kubernetes Engine (GKE) or use your own orchestration
framework, you must complete a one-time project setup to enable the required
APIs, grant IAM roles, initialize the Filestore
service agent, and configure Virtual Private Cloud (VPC) networking using
Private Service Connect (PSC).

## Create a project and enable APIs

### Required roles


To get the permissions that
you need to set up Filestore agent volumes,

ask your administrator to grant you the
following IAM roles on your project:

- Configure Service Connection Policies and VPC networking: [Compute Network Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/compute.md.txt#compute.networkAdmin) (`roles/compute.networkAdmin`)
- View and manage Filestore instances and related resources, including volume pools and agent volumes: [Cloud Filestore Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/file.md.txt#file.editor) (`roles/file.editor`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Initialize the service agent

If you haven't created a Filestore instance in your project,
initialize the Filestore service agent by running the
following command:

```
gcloud beta services identity create \
    --service=file.googleapis.com \
    --project=PROJECT_ID
```

Replace `PROJECT_ID` with the ID of your Google Cloud
project.

## Grant permissions to the service agent

To set up Filestore agent volumes, grant the Cloud Filestore
Editor (`roles/file.editor`) role to the Filestore service agent:

```
gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="serviceAccount:service-PROJECT_NUMBER@cloud-filer.iam.gserviceaccount.com" \
    --role="roles/file.editor"
```

Replace the following:

- `PROJECT_ID`: the ID of your Google Cloud project.
- `PROJECT_NUMBER`: the project number of your Google Cloud project.

> [!NOTE]
> **Note:** If you receive a `service account not found` error when assigning the IAM role, you might need to [manually create the service agent](https://docs.cloud.google.com/iam/docs/create-service-agents.md.txt).

## Configure Private Service Connect networking

Filestore agent volumes use
[Private Service Connect](https://docs.cloud.google.com/vpc/docs/private-service-connect.md.txt)
to connect managed storage infrastructure directly to your VPC
network. Private Service Connect ensures private, high-bandwidth,
and low-latency communication without requiring public IP addresses or
VPC Network Peering configurations.

To create a service connection policy, run the following command:

```
gcloud network-connectivity service-connection-policies create POLICY_NAME \
    --project=PROJECT_ID \
    --region=REGION \
    --network=projects/PROJECT_ID/global/networks/VPC_NETWORK \
    --subnets=SUBNET_NAME \
    --service-class=google-cloud-filestore
```

Replace the following:

- `POLICY_NAME`: a name for the service connection policy, such as `filestore-agent-psc-policy`.
- `PROJECT_ID`: the ID of your Google Cloud project.
- `REGION`: the region where the volume pool and workloads will reside, such as `us-central1`.
- `VPC_NETWORK`: the name of an existing VPC network.
- `SUBNET_NAME`: the name of a regular VPC subnet in the specified region where Private Service Connect endpoint IP addresses are allocated. For example, you can use the default subnet with the `--purpose` flag set to `PRIVATE`.

## Create volume pools

[Create and manage volume pools](https://docs.cloud.google.com/filestore/docs/create-volume-pools.md.txt) to reserve shared regional capacity and IOPS.

## Choose your orchestration path

- [Set up GKE environment for Filestore agent volumes](https://docs.cloud.google.com/filestore/docs/use-filestore-agent-volumes-gke.md.txt) to automatically provision and mount volumes using the Filestore CSI driver.
- [Use Filestore volumes with your orchestration framework](https://docs.cloud.google.com/filestore/docs/manage-agent-volumes.md.txt) to provision, clone, tier, and manage individual volumes directly.