Provides a DigitalOcean NFS share which can be mounted to Droplets to provide shared storage.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = new digitalocean.Vpc("example", {
name: "example-vpc",
region: "nyc1",
});
const exampleNfs = new digitalocean.Nfs("example", {
region: "nyc1",
name: "example-nfs",
size: 50,
vpcId: example.id,
});
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.Vpc("example",
name="example-vpc",
region="nyc1")
example_nfs = digitalocean.Nfs("example",
region="nyc1",
name="example-nfs",
size=50,
vpc_id=example.id)
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 {
example, err := digitalocean.NewVpc(ctx, "example", &digitalocean.VpcArgs{
Name: pulumi.String("example-vpc"),
Region: pulumi.String("nyc1"),
})
if err != nil {
return err
}
_, err = digitalocean.NewNfs(ctx, "example", &digitalocean.NfsArgs{
Region: pulumi.String("nyc1"),
Name: pulumi.String("example-nfs"),
Size: pulumi.Int(50),
VpcId: example.ID(),
})
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 = new DigitalOcean.Vpc("example", new()
{
Name = "example-vpc",
Region = "nyc1",
});
var exampleNfs = new DigitalOcean.Nfs("example", new()
{
Region = "nyc1",
Name = "example-nfs",
Size = 50,
VpcId = example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Vpc;
import com.pulumi.digitalocean.VpcArgs;
import com.pulumi.digitalocean.Nfs;
import com.pulumi.digitalocean.NfsArgs;
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) {
var example = new Vpc("example", VpcArgs.builder()
.name("example-vpc")
.region("nyc1")
.build());
var exampleNfs = new Nfs("exampleNfs", NfsArgs.builder()
.region("nyc1")
.name("example-nfs")
.size(50)
.vpcId(example.id())
.build());
}
}
resources:
example:
type: digitalocean:Vpc
properties:
name: example-vpc
region: nyc1
exampleNfs:
type: digitalocean:Nfs
name: example
properties:
region: nyc1
name: example-nfs
size: 50
vpcId: ${example.id}
Create Nfs Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Nfs(name: string, args: NfsArgs, opts?: CustomResourceOptions);@overload
def Nfs(resource_name: str,
args: NfsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Nfs(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
size: Optional[int] = None,
vpc_id: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewNfs(ctx *Context, name string, args NfsArgs, opts ...ResourceOption) (*Nfs, error)public Nfs(string name, NfsArgs args, CustomResourceOptions? opts = null)type: digitalocean:Nfs
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NfsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NfsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NfsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NfsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NfsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var nfsResource = new DigitalOcean.Nfs("nfsResource", new()
{
Region = "string",
Size = 0,
VpcId = "string",
Name = "string",
Tags = new[]
{
"string",
},
});
example, err := digitalocean.NewNfs(ctx, "nfsResource", &digitalocean.NfsArgs{
Region: pulumi.String("string"),
Size: pulumi.Int(0),
VpcId: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var nfsResource = new Nfs("nfsResource", NfsArgs.builder()
.region("string")
.size(0)
.vpcId("string")
.name("string")
.tags("string")
.build());
nfs_resource = digitalocean.Nfs("nfsResource",
region="string",
size=0,
vpc_id="string",
name="string",
tags=["string"])
const nfsResource = new digitalocean.Nfs("nfsResource", {
region: "string",
size: 0,
vpcId: "string",
name: "string",
tags: ["string"],
});
type: digitalocean:Nfs
properties:
name: string
region: string
size: 0
tags:
- string
vpcId: string
Nfs Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Nfs resource accepts the following input properties:
- Region string
- The region where the NFS share will be created.
- Size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- Vpc
Id string - The ID of the VPC where the NFS share will be created.
- Name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- List<string>
- Region string
- The region where the NFS share will be created.
- Size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- Vpc
Id string - The ID of the VPC where the NFS share will be created.
- Name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- []string
- region String
- The region where the NFS share will be created.
- size Integer
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- vpc
Id String - The ID of the VPC where the NFS share will be created.
- name String
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- List<String>
- region string
- The region where the NFS share will be created.
- size number
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- vpc
Id string - The ID of the VPC where the NFS share will be created.
- name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- string[]
- region str
- The region where the NFS share will be created.
- size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- vpc_
id str - The ID of the VPC where the NFS share will be created.
- name str
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- Sequence[str]
- region String
- The region where the NFS share will be created.
- size Number
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- vpc
Id String - The ID of the VPC where the NFS share will be created.
- name String
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- List<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the Nfs resource produces the following output properties:
- 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.
- status str
- The current status of the NFS share.
- vpc_
ids Sequence[str]
Look up Existing Nfs Resource
Get an existing Nfs resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NfsState, opts?: CustomResourceOptions): Nfs@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
host: Optional[str] = None,
mount_path: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
size: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
vpc_ids: Optional[Sequence[str]] = None) -> Nfsfunc GetNfs(ctx *Context, name string, id IDInput, state *NfsState, opts ...ResourceOption) (*Nfs, error)public static Nfs Get(string name, Input<string> id, NfsState? state, CustomResourceOptions? opts = null)public static Nfs get(String name, Output<String> id, NfsState state, CustomResourceOptions options)resources: _: type: digitalocean:Nfs get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Host string
- The host IP of the NFS server accessible from the associated VPC.
- Mount
Path string - The mount path for accessing the NFS share.
- Name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- Region string
- The region where the NFS share will be created.
- Size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- Status string
- The current status of the NFS share.
- List<string>
- Vpc
Id string - The ID of the VPC where the NFS share will be created.
- Vpc
Ids List<string>
- Host string
- The host IP of the NFS server accessible from the associated VPC.
- Mount
Path string - The mount path for accessing the NFS share.
- Name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- Region string
- The region where the NFS share will be created.
- Size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- Status string
- The current status of the NFS share.
- []string
- Vpc
Id string - The ID of the VPC where the NFS share will be created.
- Vpc
Ids []string
- host String
- The host IP of the NFS server accessible from the associated VPC.
- mount
Path String - The mount path for accessing the NFS share.
- name String
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- region String
- The region where the NFS share will be created.
- size Integer
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- status String
- The current status of the NFS share.
- List<String>
- vpc
Id String - The ID of the VPC where the NFS share will be created.
- vpc
Ids List<String>
- host string
- The host IP of the NFS server accessible from the associated VPC.
- mount
Path string - The mount path for accessing the NFS share.
- name string
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- region string
- The region where the NFS share will be created.
- size number
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- status string
- The current status of the NFS share.
- string[]
- vpc
Id string - The ID of the VPC where the NFS share will be created.
- vpc
Ids string[]
- host str
- The host IP of the NFS server accessible from the associated VPC.
- mount_
path str - The mount path for accessing the NFS share.
- name str
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- region str
- The region where the NFS share will be created.
- size int
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- status str
- The current status of the NFS share.
- Sequence[str]
- vpc_
id str - The ID of the VPC where the NFS share will be created.
- vpc_
ids Sequence[str]
- host String
- The host IP of the NFS server accessible from the associated VPC.
- mount
Path String - The mount path for accessing the NFS share.
- name String
- A name for the NFS share. Must be lowercase and composed only of numbers, letters, and "-", up to a limit of 64 characters. The name must begin with a letter.
- region String
- The region where the NFS share will be created.
- size Number
- The size of the NFS share in GiB. Minimum size is 50 GiB.
- status String
- The current status of the NFS share.
- List<String>
- vpc
Id String - The ID of the VPC where the NFS share will be created.
- vpc
Ids List<String>
Import
NFS shares can be imported using the share id and the region , e.g.
$ pulumi import digitalocean:index/nfs:Nfs foobar 506f78a4-e098-11e5-ad9f-000f53306ae1,atl1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.
