Share
Use this resource to configure a share.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
{
AdminStateUp = true,
});
var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
{
Cidr = "192.168.199.0/24",
IpVersion = 4,
NetworkId = network1.Id,
});
var sharenetwork1 = new OpenStack.SharedFileSystem.ShareNetwork("sharenetwork1", new OpenStack.SharedFileSystem.ShareNetworkArgs
{
Description = "test share network with security services",
NeutronNetId = network1.Id,
NeutronSubnetId = subnet1.Id,
});
var share1 = new OpenStack.SharedFileSystem.Share("share1", new OpenStack.SharedFileSystem.ShareArgs
{
Description = "test share description",
ShareNetworkId = sharenetwork1.Id,
ShareProto = "NFS",
Size = 1,
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
cidr="192.168.199.0/24",
ip_version=4,
network_id=network1.id)
sharenetwork1 = openstack.sharedfilesystem.ShareNetwork("sharenetwork1",
description="test share network with security services",
neutron_net_id=network1.id,
neutron_subnet_id=subnet1.id)
share1 = openstack.sharedfilesystem.Share("share1",
description="test share description",
share_network_id=sharenetwork1.id,
share_proto="NFS",
size=1)import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const network1 = new openstack.networking.Network("network_1", {
adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
cidr: "192.168.199.0/24",
ipVersion: 4,
networkId: network1.id,
});
const sharenetwork1 = new openstack.sharedfilesystem.ShareNetwork("sharenetwork_1", {
description: "test share network with security services",
neutronNetId: network1.id,
neutronSubnetId: subnet1.id,
});
const share1 = new openstack.sharedfilesystem.Share("share_1", {
description: "test share description",
shareNetworkId: sharenetwork1.id,
shareProto: "NFS",
size: 1,
});Create a Share Resource
new Share(name: string, args: ShareArgs, opts?: CustomResourceOptions);def Share(resource_name, opts=None, availability_zone=None, description=None, is_public=None, metadata=None, name=None, region=None, share_network_id=None, share_proto=None, share_type=None, size=None, snapshot_id=None, __props__=None);public Share(string name, ShareArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ShareArgs
- 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 ShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Share Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Share resource accepts the following input properties:
- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- Size int
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- Availability
Zone string The share availability zone. Changing this creates a new share.
- Description string
The human-readable description for the share. Changing this updates the description of the existing share.
- Is
Public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- Metadata Dictionary<string, object>
One or more metadata key and value pairs as a dictionary of strings.
- Name string
The name of the share. Changing this updates the name of the existing share.
- Region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share type name. If you omit this parameter, the default share type is used.
- Snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- Size int
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- Availability
Zone string The share availability zone. Changing this creates a new share.
- Description string
The human-readable description for the share. Changing this updates the description of the existing share.
- Is
Public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- Metadata map[string]interface{}
One or more metadata key and value pairs as a dictionary of strings.
- Name string
The name of the share. Changing this updates the name of the existing share.
- Region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share type name. If you omit this parameter, the default share type is used.
- Snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- size number
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- availability
Zone string The share availability zone. Changing this creates a new share.
- description string
The human-readable description for the share. Changing this updates the description of the existing share.
- is
Public boolean The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- metadata {[key: string]: any}
One or more metadata key and value pairs as a dictionary of strings.
- name string
The name of the share. Changing this updates the name of the existing share.
- region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share type name. If you omit this parameter, the default share type is used.
- snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- str
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- size float
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- availability_
zone str The share availability zone. Changing this creates a new share.
- description str
The human-readable description for the share. Changing this updates the description of the existing share.
- is_
public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- metadata Dict[str, Any]
One or more metadata key and value pairs as a dictionary of strings.
- name str
The name of the share. Changing this updates the name of the existing share.
- region str
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- str
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- str
The share type name. If you omit this parameter, the default share type is used.
- snapshot_
id str The UUID of the share’s base snapshot. Changing this creates a new share.
Outputs
All input properties are implicitly available as output properties. Additionally, the Share resource produces the following output properties:
- All
Metadata Dictionary<string, object> The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- Export
Locations List<Pulumi.Open Stack. Shared File System. Outputs. Share Export Location> A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- Has
Replicas bool Indicates whether a share has replicas or not.
- Host string
The share host name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string The owner of the Share.
- Replication
Type string The share replication type.
- string
The UUID of the share server.
- All
Metadata map[string]interface{} The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- Export
Locations []ShareExport Location A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- Has
Replicas bool Indicates whether a share has replicas or not.
- Host string
The share host name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string The owner of the Share.
- Replication
Type string The share replication type.
- string
The UUID of the share server.
- all
Metadata {[key: string]: any} The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- export
Locations ShareExport Location[] A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- has
Replicas boolean Indicates whether a share has replicas or not.
- host string
The share host name.
- id string
- The provider-assigned unique ID for this managed resource.
- project
Id string The owner of the Share.
- replication
Type string The share replication type.
- string
The UUID of the share server.
- all_
metadata Dict[str, Any] The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- export_
locations List[ShareExport Location] A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- has_
replicas bool Indicates whether a share has replicas or not.
- host str
The share host name.
- id str
- The provider-assigned unique ID for this managed resource.
- project_
id str The owner of the Share.
- replication_
type str The share replication type.
- str
The UUID of the share server.
Look up an Existing Share Resource
Get an existing Share 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?: ShareState, opts?: CustomResourceOptions): Sharestatic get(resource_name, id, opts=None, all_metadata=None, availability_zone=None, description=None, export_locations=None, has_replicas=None, host=None, is_public=None, metadata=None, name=None, project_id=None, region=None, replication_type=None, share_network_id=None, share_proto=None, share_server_id=None, share_type=None, size=None, snapshot_id=None, __props__=None);func GetShare(ctx *Context, name string, id IDInput, state *ShareState, opts ...ResourceOption) (*Share, error)public static Share Get(string name, Input<string> id, ShareState? 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:
- All
Metadata Dictionary<string, object> The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- Availability
Zone string The share availability zone. Changing this creates a new share.
- Description string
The human-readable description for the share. Changing this updates the description of the existing share.
- Export
Locations List<Pulumi.Open Stack. Shared File System. Inputs. Share Export Location Args> A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- Has
Replicas bool Indicates whether a share has replicas or not.
- Host string
The share host name.
- Is
Public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- Metadata Dictionary<string, object>
One or more metadata key and value pairs as a dictionary of strings.
- Name string
The name of the share. Changing this updates the name of the existing share.
- Project
Id string The owner of the Share.
- Region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- Replication
Type string The share replication type.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- string
The UUID of the share server.
- string
The share type name. If you omit this parameter, the default share type is used.
- Size int
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- Snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- All
Metadata map[string]interface{} The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- Availability
Zone string The share availability zone. Changing this creates a new share.
- Description string
The human-readable description for the share. Changing this updates the description of the existing share.
- Export
Locations []ShareExport Location A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- Has
Replicas bool Indicates whether a share has replicas or not.
- Host string
The share host name.
- Is
Public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- Metadata map[string]interface{}
One or more metadata key and value pairs as a dictionary of strings.
- Name string
The name of the share. Changing this updates the name of the existing share.
- Project
Id string The owner of the Share.
- Region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- Replication
Type string The share replication type.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- string
The UUID of the share server.
- string
The share type name. If you omit this parameter, the default share type is used.
- Size int
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- Snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- all
Metadata {[key: string]: any} The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- availability
Zone string The share availability zone. Changing this creates a new share.
- description string
The human-readable description for the share. Changing this updates the description of the existing share.
- export
Locations ShareExport Location[] A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- has
Replicas boolean Indicates whether a share has replicas or not.
- host string
The share host name.
- is
Public boolean The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- metadata {[key: string]: any}
One or more metadata key and value pairs as a dictionary of strings.
- name string
The name of the share. Changing this updates the name of the existing share.
- project
Id string The owner of the Share.
- region string
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- replication
Type string The share replication type.
- string
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- string
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- string
The UUID of the share server.
- string
The share type name. If you omit this parameter, the default share type is used.
- size number
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- snapshot
Id string The UUID of the share’s base snapshot. Changing this creates a new share.
- all_
metadata Dict[str, Any] The map of metadata, assigned on the share, which has been explicitly and implicitly added.
- availability_
zone str The share availability zone. Changing this creates a new share.
- description str
The human-readable description for the share. Changing this updates the description of the existing share.
- export_
locations List[ShareExport Location] A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
- has_
replicas bool Indicates whether a share has replicas or not.
- host str
The share host name.
- is_
public bool The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
- metadata Dict[str, Any]
One or more metadata key and value pairs as a dictionary of strings.
- name str
The name of the share. Changing this updates the name of the existing share.
- project_
id str The owner of the Share.
- region str
The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share. Changing this creates a new share.
- replication_
type str The share replication type.
- str
The UUID of a share network where the share server exists or will be created. If
share_network_idis not set and you provide asnapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.- str
The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
- str
The UUID of the share server.
- str
The share type name. If you omit this parameter, the default share type is used.
- size float
The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
- snapshot_
id str The UUID of the share’s base snapshot. Changing this creates a new share.
Supporting Types
ShareExportLocation
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.