# ionoscloud\_nfs\_share

Returns information about shares of Network File Storage (NFS) on IONOS CLOUD.

## Example Usage

## By ID

```hcl
data "ionoscloud_nfs_share" "example" {
  location = "location"
  cluster_id = "cluster-id"
  id = "share-id"
}
```

## By Name

```hcl
data "ionoscloud_nfs_share" "example" {
  location = "location"
  cluster_id = "cluster-id"
  name = "partial-name"
  partial_match = true
}

output "share_test_output" {
    value = format("share %s quota %sMiB path '%s'",
        data.ionoscloud_nfs_share.example.name,
        data.ionoscloud_nfs_share.example.quota,
        data.ionoscloud_nfs_share.example.nfs_path,
    )
}
```

## Argument Reference

* `location` - (Optional) The location where the Network File Storage share is located. Available locations: `de/fra`, `de/fra/2`, `de/txl`, `fr/par`, `gb/lhr`, `es/vit`, `us/las`, `us/ewr`, `us/mci`.
* `cluster_id` - (Required) The ID of the Network File Storage cluster.
* `name` - (Optional) Name of the Network File Storage share.
* `id` - (Optional) ID of the Network File Storage share.
* `partial_match` - (Optional) Whether partial matching is allowed or not when using the name filter. Defaults to `false`.

## Attributes Reference

* `id` - The ID of the Network File Storage share.
* `name` - The name of the Network File Storage share.
* `location` - The location where the Network File Storage share is located.
* `cluster_id` - The ID of the Network File Storage cluster.
* `nfs_path` - Path to the NFS export. The NFS path is the path to the directory being exported.
* `quota` - The quota in MiB for the export. The quota can restrict the amount of data that can be stored within the export. The quota can be disabled using `0`.
* `gid` - The group ID that will own the exported directory. If not set, **anonymous** (`512`) will be used.
* `uid` - The user ID that will own the exported directory. If not set, **anonymous** (`512`) will be used.
* `client_groups` - The groups of clients are the systems connecting to the Network File Storage cluster. Each client group supports the following:
  * `description` - Optional description for the clients groups.
  * `ip_networks` - The allowed host or network to which the export is being shared. The IP address can be either IPv4 or IPv6 and has to be given with CIDR notation.
  * `hosts` - A singular host allowed to connect to the share. The host can be specified as IP address and can be either IPv4 or IPv6.
  * `nfs` - The NFS configuration for the client group. Each NFS configuration supports the following:
    * `squash` - The squash mode for the export. The squash mode can be: none - No squash mode. no mapping, root-anonymous - Map root user to anonymous uid, all-anonymous - Map all users to anonymous uid.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/nfs_share.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
