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);
func NewShare(ctx *Context, name string, args ShareArgs, opts ...ResourceOption) (*Share, error)
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:

ShareProto 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.

AvailabilityZone 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.

IsPublic 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.

ShareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

ShareType string

The share type name. If you omit this parameter, the default share type is used.

SnapshotId string

The UUID of the share’s base snapshot. Changing this creates a new share.

ShareProto 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.

AvailabilityZone 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.

IsPublic 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.

ShareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

ShareType string

The share type name. If you omit this parameter, the default share type is used.

SnapshotId string

The UUID of the share’s base snapshot. Changing this creates a new share.

shareProto 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.

availabilityZone 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.

isPublic 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.

shareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

shareType string

The share type name. If you omit this parameter, the default share type is used.

snapshotId string

The UUID of the share’s base snapshot. Changing this creates a new share.

share_proto 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.

share_network_id str

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

share_type 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:

AllMetadata Dictionary<string, object>

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

ExportLocations List<Pulumi.OpenStack.SharedFileSystem.Outputs.ShareExportLocation>

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

HasReplicas 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.
ProjectId string

The owner of the Share.

ReplicationType string

The share replication type.

ShareServerId string

The UUID of the share server.

AllMetadata map[string]interface{}

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

ExportLocations []ShareExportLocation

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

HasReplicas 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.
ProjectId string

The owner of the Share.

ReplicationType string

The share replication type.

ShareServerId string

The UUID of the share server.

allMetadata {[key: string]: any}

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

exportLocations ShareExportLocation[]

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

hasReplicas 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.
projectId string

The owner of the Share.

replicationType string

The share replication type.

shareServerId 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[ShareExportLocation]

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.

share_server_id 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): Share
static 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:

AllMetadata Dictionary<string, object>

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

AvailabilityZone 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.

ExportLocations List<Pulumi.OpenStack.SharedFileSystem.Inputs.ShareExportLocationArgs>

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

HasReplicas bool

Indicates whether a share has replicas or not.

Host string

The share host name.

IsPublic 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.

ProjectId 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.

ReplicationType string

The share replication type.

ShareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

ShareProto string

The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.

ShareServerId string

The UUID of the share server.

ShareType 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.

SnapshotId string

The UUID of the share’s base snapshot. Changing this creates a new share.

AllMetadata map[string]interface{}

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

AvailabilityZone 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.

ExportLocations []ShareExportLocation

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

HasReplicas bool

Indicates whether a share has replicas or not.

Host string

The share host name.

IsPublic 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.

ProjectId 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.

ReplicationType string

The share replication type.

ShareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

ShareProto string

The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.

ShareServerId string

The UUID of the share server.

ShareType 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.

SnapshotId string

The UUID of the share’s base snapshot. Changing this creates a new share.

allMetadata {[key: string]: any}

The map of metadata, assigned on the share, which has been explicitly and implicitly added.

availabilityZone 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.

exportLocations ShareExportLocation[]

A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.

hasReplicas boolean

Indicates whether a share has replicas or not.

host string

The share host name.

isPublic 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.

projectId 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.

replicationType string

The share replication type.

shareNetworkId string

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

shareProto string

The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.

shareServerId string

The UUID of the share server.

shareType 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.

snapshotId 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[ShareExportLocation]

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.

share_network_id str

The UUID of a share network where the share server exists or will be created. If share_network_id is not set and you provide a snapshot_id, the share_network_id value from the snapshot is used. Changing this creates a new share.

share_proto str

The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.

share_server_id str

The UUID of the share server.

share_type 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.

Path string
Preferred string
Path string
Preferred string
path string
preferred string
path str
preferred str

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.