nfs

Generated on 11 Feb 2026 from digitalocean.cloud version v1.2.1

Synopsis

Create or delete NFS file shares. NFS (Network File System) provides shared file storage that can be mounted by multiple Droplets simultaneously. View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#tag/NFS.

Requirements

  • pydo >= 0.1.3
  • azure-core >= 1.26.1

Parameters

Parameter Choices / Default Description
client_override_options
dict
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options.
id
str
The unique identifier of the NFS share. Used for lookup when deleting or updating.
module_override_options
dict
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options.
name
str / required
The name of the NFS share.
region
str / required
The slug identifier for the region where the NFS share will be created.
size_gib
int
The size of the NFS share in GiB (Gibibytes). Must be >= 50.
state
str
Choices:
  • present (default)
  • absent
State of the resource, present to create, absent to destroy.
timeout
int
Default: 300 Polling timeout in seconds.
token
str
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN, DIGITALOCEAN_TOKEN, DO_API_TOKEN, DO_API_KEY, DO_OAUTH_TOKEN and OAUTH_TOKEN
vpc_ids
list / elements=str
List of VPC IDs that should be able to access the share.

Examples

- name: Create NFS share
  digitalocean.cloud.nfs:
    token: "{{ token }}"
    state: present
    name: my-nfs-share
    region: nyc3
    size_gib: 100
    vpc_ids:
      - "5a4981aa-9653-4bd1-bef5-d6bff52042e4"

- name: Delete NFS share by name
  digitalocean.cloud.nfs:
    token: "{{ token }}"
    state: absent
    name: my-nfs-share
    region: nyc3

- name: Delete NFS share by ID
  digitalocean.cloud.nfs:
    token: "{{ token }}"
    state: absent
    name: my-nfs-share
    region: nyc3
    id: 5a4981aa-9653-4bd1-bef5-d6bff52042e4

Return Values

KeyReturnedDescription
error
dict
failure DigitalOcean API error.
Sample:
{
  "Message": "Informational error message.",
  "Reason": "Unauthorized",
  "Status Code": 401
}
msg
str
always NFS share result information.
Sample:
[
  "Created NFS share my-nfs-share (5a4981aa-9653-4bd1-bef5-d6bff52042e4)",
  "Deleted NFS share my-nfs-share (5a4981aa-9653-4bd1-bef5-d6bff52042e4)",
  "NFS share my-nfs-share would be created",
  "NFS share my-nfs-share (5a4981aa-9653-4bd1-bef5-d6bff52042e4) exists",
  "NFS share my-nfs-share does not exist"
]
nfs
dict
always NFS share information.
Sample:
{
  "created_at": "2020-03-13T19:20:47.442049222Z",
  "host": "10.132.0.2",
  "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
  "mount_path": "/mnt/nfs-share",
  "name": "my-nfs-share",
  "region": "nyc3",
  "size_gib": 100,
  "status": "ACTIVE",
  "vpc_ids": [
    "5a4981aa-9653-4bd1-bef5-d6bff52042e4"
  ]
}

We can't find any results for your search.

Try using different keywords or simplifying your search terms.