NasDatastore
The vsphere..NasDatastore resource can be used to create and manage NAS
datastores on an ESXi host or a set of hosts. The resource supports mounting
NFS v3 and v4.1 shares to be used as datastores.
NOTE: Unlike
vsphere..VmfsDatastore, a NAS datastore is only mounted on the hosts you choose to mount it on. To mount on multiple hosts, you must specify each host that you want to add in thehost_system_idsargument.
Create a NasDatastore Resource
new NasDatastore(name: string, args: NasDatastoreArgs, opts?: CustomResourceOptions);def NasDatastore(resource_name, opts=None, access_mode=None, custom_attributes=None, datastore_cluster_id=None, folder=None, host_system_ids=None, name=None, remote_hosts=None, remote_path=None, security_type=None, tags=None, type=None, __props__=None);func NewNasDatastore(ctx *Context, name string, args NasDatastoreArgs, opts ...ResourceOption) (*NasDatastore, error)public NasDatastore(string name, NasDatastoreArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NasDatastoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NasDatastoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NasDatastoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
NasDatastore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NasDatastore resource accepts the following input properties:
- Host
System List<string>Ids The managed object IDs of the hosts to mount the datastore on.
- Remote
Hosts List<string> The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- Remote
Path string The remote path of the mount point. Forces a new resource if changed.
- Access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to attribute value strings to set on datasource resource.
- Datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- Folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- Name string
The name of the datastore. Forces a new resource if changed.
- Security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- List<string>
The IDs of any tags to attach to this resource.
- Type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
- Host
System []stringIds The managed object IDs of the hosts to mount the datastore on.
- Remote
Hosts []string The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- Remote
Path string The remote path of the mount point. Forces a new resource if changed.
- Access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- Custom
Attributes map[string]string Map of custom attribute ids to attribute value strings to set on datasource resource.
- Datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- Folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- Name string
The name of the datastore. Forces a new resource if changed.
- Security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- []string
The IDs of any tags to attach to this resource.
- Type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
- host
System string[]Ids The managed object IDs of the hosts to mount the datastore on.
- remote
Hosts string[] The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- remote
Path string The remote path of the mount point. Forces a new resource if changed.
- access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- custom
Attributes {[key: string]: string} Map of custom attribute ids to attribute value strings to set on datasource resource.
- datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- name string
The name of the datastore. Forces a new resource if changed.
- security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- string[]
The IDs of any tags to attach to this resource.
- type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
- host_
system_ List[str]ids The managed object IDs of the hosts to mount the datastore on.
- remote_
hosts List[str] The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- remote_
path str The remote path of the mount point. Forces a new resource if changed.
- access_
mode str Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- custom_
attributes Dict[str, str] Map of custom attribute ids to attribute value strings to set on datasource resource.
- datastore_
cluster_ strid The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- folder str
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- name str
The name of the datastore. Forces a new resource if changed.
- security_
type str The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- List[str]
The IDs of any tags to attach to this resource.
- type str
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the NasDatastore resource produces the following output properties:
- Accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- Capacity int
Maximum capacity of the datastore, in megabytes.
- Free
Space int Available space of this datastore, in megabytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Mode string The current maintenance mode state of the datastore.
- Multiple
Host boolAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- Protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- Uncommitted
Space int Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- Url string
The unique locator for the datastore.
- Accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- Capacity int
Maximum capacity of the datastore, in megabytes.
- Free
Space int Available space of this datastore, in megabytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Mode string The current maintenance mode state of the datastore.
- Multiple
Host boolAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- Protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- Uncommitted
Space int Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- Url string
The unique locator for the datastore.
- accessible boolean
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- capacity number
Maximum capacity of the datastore, in megabytes.
- free
Space number Available space of this datastore, in megabytes.
- id string
- The provider-assigned unique ID for this managed resource.
- maintenance
Mode string The current maintenance mode state of the datastore.
- multiple
Host booleanAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- uncommitted
Space number Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- url string
The unique locator for the datastore.
- accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- capacity float
Maximum capacity of the datastore, in megabytes.
- free_
space float Available space of this datastore, in megabytes.
- id str
- The provider-assigned unique ID for this managed resource.
- maintenance_
mode str The current maintenance mode state of the datastore.
- multiple_
host_ boolaccess If
true, more than one host in the datacenter has been configured with access to the datastore.- protocol_
endpoint str Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- uncommitted_
space float Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- url str
The unique locator for the datastore.
Look up an Existing NasDatastore Resource
Get an existing NasDatastore 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?: NasDatastoreState, opts?: CustomResourceOptions): NasDatastorestatic get(resource_name, id, opts=None, access_mode=None, accessible=None, capacity=None, custom_attributes=None, datastore_cluster_id=None, folder=None, free_space=None, host_system_ids=None, maintenance_mode=None, multiple_host_access=None, name=None, protocol_endpoint=None, remote_hosts=None, remote_path=None, security_type=None, tags=None, type=None, uncommitted_space=None, url=None, __props__=None);func GetNasDatastore(ctx *Context, name string, id IDInput, state *NasDatastoreState, opts ...ResourceOption) (*NasDatastore, error)public static NasDatastore Get(string name, Input<string> id, NasDatastoreState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- Accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- Capacity int
Maximum capacity of the datastore, in megabytes.
- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to attribute value strings to set on datasource resource.
- Datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- Folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- Free
Space int Available space of this datastore, in megabytes.
- Host
System List<string>Ids The managed object IDs of the hosts to mount the datastore on.
- Maintenance
Mode string The current maintenance mode state of the datastore.
- Multiple
Host boolAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- Name string
The name of the datastore. Forces a new resource if changed.
- Protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- Remote
Hosts List<string> The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- Remote
Path string The remote path of the mount point. Forces a new resource if changed.
- Security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- List<string>
The IDs of any tags to attach to this resource.
- Type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.- Uncommitted
Space int Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- Url string
The unique locator for the datastore.
- Access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- Accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- Capacity int
Maximum capacity of the datastore, in megabytes.
- Custom
Attributes map[string]string Map of custom attribute ids to attribute value strings to set on datasource resource.
- Datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- Folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- Free
Space int Available space of this datastore, in megabytes.
- Host
System []stringIds The managed object IDs of the hosts to mount the datastore on.
- Maintenance
Mode string The current maintenance mode state of the datastore.
- Multiple
Host boolAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- Name string
The name of the datastore. Forces a new resource if changed.
- Protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- Remote
Hosts []string The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- Remote
Path string The remote path of the mount point. Forces a new resource if changed.
- Security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- []string
The IDs of any tags to attach to this resource.
- Type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.- Uncommitted
Space int Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- Url string
The unique locator for the datastore.
- access
Mode string Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- accessible boolean
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- capacity number
Maximum capacity of the datastore, in megabytes.
- custom
Attributes {[key: string]: string} Map of custom attribute ids to attribute value strings to set on datasource resource.
- datastore
Cluster stringId The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- folder string
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- free
Space number Available space of this datastore, in megabytes.
- host
System string[]Ids The managed object IDs of the hosts to mount the datastore on.
- maintenance
Mode string The current maintenance mode state of the datastore.
- multiple
Host booleanAccess If
true, more than one host in the datacenter has been configured with access to the datastore.- name string
The name of the datastore. Forces a new resource if changed.
- protocol
Endpoint string Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- remote
Hosts string[] The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- remote
Path string The remote path of the mount point. Forces a new resource if changed.
- security
Type string The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- string[]
The IDs of any tags to attach to this resource.
- type string
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.- uncommitted
Space number Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- url string
The unique locator for the datastore.
- access_
mode str Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default:readWrite. Forces a new resource if changed.- accessible bool
The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.- capacity float
Maximum capacity of the datastore, in megabytes.
- custom_
attributes Dict[str, str] Map of custom attribute ids to attribute value strings to set on datasource resource.
- datastore_
cluster_ strid The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.- folder str
The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.- free_
space float Available space of this datastore, in megabytes.
- host_
system_ List[str]ids The managed object IDs of the hosts to mount the datastore on.
- maintenance_
mode str The current maintenance mode state of the datastore.
- multiple_
host_ boolaccess If
true, more than one host in the datacenter has been configured with access to the datastore.- name str
The name of the datastore. Forces a new resource if changed.
- protocol_
endpoint str Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
- remote_
hosts List[str] The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
- remote_
path str The remote path of the mount point. Forces a new resource if changed.
- security_
type str The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.- List[str]
The IDs of any tags to attach to this resource.
- type str
The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.- uncommitted_
space float Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
- url str
The unique locator for the datastore.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.