1. Packages
  2. DigitalOcean Provider
  3. API Docs
  4. getNfs
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
digitalocean logo
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi

    Get information about a DigitalOcean NFS share.

    Example Usage

    Get the NFS share by name and region:

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = digitalocean.getNfs({
        name: "example-nfs",
        region: "nyc1",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.get_nfs(name="example-nfs",
        region="nyc1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.LookupNfs(ctx, &digitalocean.LookupNfsArgs{
    			Name:   "example-nfs",
    			Region: pulumi.StringRef("nyc1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = DigitalOcean.GetNfs.Invoke(new()
        {
            Name = "example-nfs",
            Region = "nyc1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetNfsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = DigitaloceanFunctions.getNfs(GetNfsArgs.builder()
                .name("example-nfs")
                .region("nyc1")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: digitalocean:getNfs
          arguments:
            name: example-nfs
            region: nyc1
    

    Using getNfs

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNfs(args: GetNfsArgs, opts?: InvokeOptions): Promise<GetNfsResult>
    function getNfsOutput(args: GetNfsOutputArgs, opts?: InvokeOptions): Output<GetNfsResult>
    def get_nfs(name: Optional[str] = None,
                region: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetNfsResult
    def get_nfs_output(name: Optional[pulumi.Input[str]] = None,
                region: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetNfsResult]
    func LookupNfs(ctx *Context, args *LookupNfsArgs, opts ...InvokeOption) (*LookupNfsResult, error)
    func LookupNfsOutput(ctx *Context, args *LookupNfsOutputArgs, opts ...InvokeOption) LookupNfsResultOutput

    > Note: This function is named LookupNfs in the Go SDK.

    public static class GetNfs 
    {
        public static Task<GetNfsResult> InvokeAsync(GetNfsArgs args, InvokeOptions? opts = null)
        public static Output<GetNfsResult> Invoke(GetNfsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNfsResult> getNfs(GetNfsArgs args, InvokeOptions options)
    public static Output<GetNfsResult> getNfs(GetNfsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: digitalocean:index/getNfs:getNfs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the NFS share.
    Region string
    The region where the NFS share is located.
    Name string
    The name of the NFS share.
    Region string
    The region where the NFS share is located.
    name String
    The name of the NFS share.
    region String
    The region where the NFS share is located.
    name string
    The name of the NFS share.
    region string
    The region where the NFS share is located.
    name str
    The name of the NFS share.
    region str
    The region where the NFS share is located.
    name String
    The name of the NFS share.
    region String
    The region where the NFS share is located.

    getNfs Result

    The following output properties are available:

    Host string
    The host IP of the NFS server accessible from the associated VPC.
    Id string
    The provider-assigned unique ID for this managed resource.
    MountPath string
    The mount path for accessing the NFS share.
    Name string
    Name of the NFS share.
    Size int
    The size of the NFS share in GiB.
    Status string
    The current status of the NFS share.
    Tags List<string>
    Region string
    The region where the NFS share is located.
    Host string
    The host IP of the NFS server accessible from the associated VPC.
    Id string
    The provider-assigned unique ID for this managed resource.
    MountPath string
    The mount path for accessing the NFS share.
    Name string
    Name of the NFS share.
    Size int
    The size of the NFS share in GiB.
    Status string
    The current status of the NFS share.
    Tags []string
    Region string
    The region where the NFS share is located.
    host String
    The host IP of the NFS server accessible from the associated VPC.
    id String
    The provider-assigned unique ID for this managed resource.
    mountPath String
    The mount path for accessing the NFS share.
    name String
    Name of the NFS share.
    size Integer
    The size of the NFS share in GiB.
    status String
    The current status of the NFS share.
    tags List<String>
    region String
    The region where the NFS share is located.
    host string
    The host IP of the NFS server accessible from the associated VPC.
    id string
    The provider-assigned unique ID for this managed resource.
    mountPath string
    The mount path for accessing the NFS share.
    name string
    Name of the NFS share.
    size number
    The size of the NFS share in GiB.
    status string
    The current status of the NFS share.
    tags string[]
    region string
    The region where the NFS share is located.
    host str
    The host IP of the NFS server accessible from the associated VPC.
    id str
    The provider-assigned unique ID for this managed resource.
    mount_path str
    The mount path for accessing the NFS share.
    name str
    Name of the NFS share.
    size int
    The size of the NFS share in GiB.
    status str
    The current status of the NFS share.
    tags Sequence[str]
    region str
    The region where the NFS share is located.
    host String
    The host IP of the NFS server accessible from the associated VPC.
    id String
    The provider-assigned unique ID for this managed resource.
    mountPath String
    The mount path for accessing the NFS share.
    name String
    Name of the NFS share.
    size Number
    The size of the NFS share in GiB.
    status String
    The current status of the NFS share.
    tags List<String>
    region String
    The region where the NFS share is located.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate