UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

232 lines (231 loc) 8.13 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## Example Usage * * ### NFS * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const network1 = new openstack.networking.Network("network_1", { * name: "network_1", * adminStateUp: true, * }); * const subnet1 = new openstack.networking.Subnet("subnet_1", { * name: "subnet_1", * cidr: "192.168.199.0/24", * ipVersion: 4, * networkId: network1.id, * }); * const sharenetwork1 = new openstack.sharedfilesystem.ShareNetwork("sharenetwork_1", { * name: "test_sharenetwork", * description: "test share network with security services", * neutronNetId: network1.id, * neutronSubnetId: subnet1.id, * }); * const share1 = new openstack.sharedfilesystem.Share("share_1", { * name: "nfs_share", * description: "test share description", * shareProto: "NFS", * size: 1, * shareNetworkId: sharenetwork1.id, * }); * const shareAccess1 = new openstack.sharedfilesystem.ShareAccess("share_access_1", { * shareId: share1.id, * accessType: "ip", * accessTo: "192.168.199.10", * accessLevel: "rw", * }); * ``` * * ### CIFS * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const network1 = new openstack.networking.Network("network_1", { * name: "network_1", * adminStateUp: true, * }); * const subnet1 = new openstack.networking.Subnet("subnet_1", { * name: "subnet_1", * cidr: "192.168.199.0/24", * ipVersion: 4, * networkId: network1.id, * }); * const securityservice1 = new openstack.sharedfilesystem.SecurityService("securityservice_1", { * name: "security", * description: "created by terraform", * type: "active_directory", * server: "192.168.199.10", * dnsIp: "192.168.199.10", * domain: "example.com", * ou: "CN=Computers,DC=example,DC=com", * user: "joinDomainUser", * password: "s8cret", * }); * const sharenetwork1 = new openstack.sharedfilesystem.ShareNetwork("sharenetwork_1", { * name: "test_sharenetwork_secure", * description: "share the secure love", * neutronNetId: network1.id, * neutronSubnetId: subnet1.id, * securityServiceIds: [securityservice1.id], * }); * const share1 = new openstack.sharedfilesystem.Share("share_1", { * name: "cifs_share", * shareProto: "CIFS", * size: 1, * shareNetworkId: sharenetwork1.id, * }); * const shareAccess1 = new openstack.sharedfilesystem.ShareAccess("share_access_1", { * shareId: share1.id, * accessType: "user", * accessTo: "windows", * accessLevel: "ro", * }); * const shareAccess2 = new openstack.sharedfilesystem.ShareAccess("share_access_2", { * shareId: share1.id, * accessType: "user", * accessTo: "linux", * accessLevel: "rw", * }); * export const exportLocations = share1.exportLocations; * ``` * * ## Import * * This resource can be imported by specifying the ID of the share and the ID of the * share access, separated by a slash, e.g.: * * ```sh * $ pulumi import openstack:sharedfilesystem/shareAccess:ShareAccess share_access_1 share_id/share_access_id * ``` */ export declare class ShareAccess extends pulumi.CustomResource { /** * Get an existing ShareAccess resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ShareAccessState, opts?: pulumi.CustomResourceOptions): ShareAccess; /** * Returns true if the given object is an instance of ShareAccess. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ShareAccess; /** * The access credential of the entity granted access. */ readonly accessKey: pulumi.Output<string>; /** * The access level to the share. Can either be `rw` or `ro`. */ readonly accessLevel: pulumi.Output<string>; /** * The value that defines the access. Can either be an IP * address or a username verified by configured Security Service of the Share Network. */ readonly accessTo: pulumi.Output<string>; /** * The access rule type. Can either be an ip, user, * cert, or cephx. cephx support requires an OpenStack environment that supports * Shared Filesystem microversion 2.13 (Mitaka) or later. */ readonly accessType: pulumi.Output<string>; /** * The region in which to obtain the V2 Shared File System * client. A Shared File System client is needed to create a share access. * Changing this creates a new share access. */ readonly region: pulumi.Output<string>; /** * The UUID of the share to which you are granted access. */ readonly shareId: pulumi.Output<string>; /** * The share access state. */ readonly state: pulumi.Output<string>; /** * Create a ShareAccess resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ShareAccessArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ShareAccess resources. */ export interface ShareAccessState { /** * The access credential of the entity granted access. */ accessKey?: pulumi.Input<string>; /** * The access level to the share. Can either be `rw` or `ro`. */ accessLevel?: pulumi.Input<string>; /** * The value that defines the access. Can either be an IP * address or a username verified by configured Security Service of the Share Network. */ accessTo?: pulumi.Input<string>; /** * The access rule type. Can either be an ip, user, * cert, or cephx. cephx support requires an OpenStack environment that supports * Shared Filesystem microversion 2.13 (Mitaka) or later. */ accessType?: pulumi.Input<string>; /** * The region in which to obtain the V2 Shared File System * client. A Shared File System client is needed to create a share access. * Changing this creates a new share access. */ region?: pulumi.Input<string>; /** * The UUID of the share to which you are granted access. */ shareId?: pulumi.Input<string>; /** * The share access state. */ state?: pulumi.Input<string>; } /** * The set of arguments for constructing a ShareAccess resource. */ export interface ShareAccessArgs { /** * The access level to the share. Can either be `rw` or `ro`. */ accessLevel: pulumi.Input<string>; /** * The value that defines the access. Can either be an IP * address or a username verified by configured Security Service of the Share Network. */ accessTo: pulumi.Input<string>; /** * The access rule type. Can either be an ip, user, * cert, or cephx. cephx support requires an OpenStack environment that supports * Shared Filesystem microversion 2.13 (Mitaka) or later. */ accessType: pulumi.Input<string>; /** * The region in which to obtain the V2 Shared File System * client. A Shared File System client is needed to create a share access. * Changing this creates a new share access. */ region?: pulumi.Input<string>; /** * The UUID of the share to which you are granted access. */ shareId: pulumi.Input<string>; }