import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Google Cloud Filestore instance. * * To get more information about Instance, see: * * * [API documentation](https://cloud.google.com/filestore/docs/reference/rest/v1beta1/projects.locations.instances/create) * * How-to Guides * * [Copying Data In/Out](https://cloud.google.com/filestore/docs/copying-data) * * [Official Documentation](https://cloud.google.com/filestore/docs/creating-instances) * * [Use with Kubernetes](https://cloud.google.com/filestore/docs/accessing-fileshares) * * ## Example Usage * * ### Filestore Instance Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const instance = new gcp.filestore.Instance("instance", { * name: "test-instance", * location: "us-central1-b", * tier: "BASIC_HDD", * fileShares: { * capacityGb: 1024, * name: "share1", * }, * networks: [{ * network: "default", * modes: ["MODE_IPV4"], * }], * }); * ``` * ### Filestore Instance Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const instance = new gcp.filestore.Instance("instance", { * name: "test-instance", * location: "us-central1-b", * tier: "BASIC_SSD", * fileShares: { * capacityGb: 2560, * name: "share1", * nfsExportOptions: [ * { * ipRanges: ["10.0.0.0/24"], * accessMode: "READ_WRITE", * squashMode: "NO_ROOT_SQUASH", * }, * { * ipRanges: ["10.10.0.0/24"], * accessMode: "READ_ONLY", * squashMode: "ROOT_SQUASH", * anonUid: 123, * anonGid: 456, * }, * ], * }, * networks: [{ * network: "default", * modes: ["MODE_IPV4"], * connectMode: "DIRECT_PEERING", * }], * }); * ``` * ### Filestore Instance Protocol * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const instance = new gcp.filestore.Instance("instance", { * name: "test-instance", * location: "us-central1", * tier: "ENTERPRISE", * protocol: "NFS_V4_1", * fileShares: { * capacityGb: 1024, * name: "share1", * }, * networks: [{ * network: "default", * modes: ["MODE_IPV4"], * }], * }); * ``` * ### Filestore Instance Enterprise * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const filestoreKeyring = new gcp.kms.KeyRing("filestore_keyring", { * name: "filestore-keyring", * location: "us-central1", * }); * const filestoreKey = new gcp.kms.CryptoKey("filestore_key", { * name: "filestore-key", * keyRing: filestoreKeyring.id, * }); * const instance = new gcp.filestore.Instance("instance", { * name: "test-instance", * location: "us-central1", * tier: "ENTERPRISE", * fileShares: { * capacityGb: 1024, * name: "share1", * }, * networks: [{ * network: "default", * modes: ["MODE_IPV4"], * }], * kmsKeyName: filestoreKey.id, * }); * ``` * * ## Import * * Instance can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/instances/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:filestore/instance:Instance default projects/{{project}}/locations/{{location}}/instances/{{name}} * ``` * * ```sh * $ pulumi import gcp:filestore/instance:Instance default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:filestore/instance:Instance default {{location}}/{{name}} * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * Creation timestamp in RFC3339 text format. */ readonly createTime: pulumi.Output; /** * Indicates whether the instance is protected against deletion. */ readonly deletionProtectionEnabled: pulumi.Output; /** * The reason for enabling deletion protection. */ readonly deletionProtectionReason: pulumi.Output; /** * A description of the instance. */ readonly description: pulumi.Output; /** * Directory Services configuration. * Should only be set if protocol is "NFS_V4_1". * Structure is documented below. */ readonly directoryServices: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Output only fields for replication configuration. * Structure is documented below. */ readonly effectiveReplications: pulumi.Output; /** * Server-specified ETag for the instance resource to prevent * simultaneous updates from overwriting each other. */ readonly etag: pulumi.Output; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ readonly fileShares: pulumi.Output; /** * Replication configuration, once set, this cannot be updated. * Additionally this should be specified on the replica instance only, indicating the active as the peerInstance * Structure is documented below. */ readonly initialReplication: pulumi.Output; /** * KMS key name used for data encryption. */ readonly kmsKeyName: pulumi.Output; /** * Resource labels to represent user-provided metadata. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The name of the location of the instance. This can be a region for ENTERPRISE tier instances. */ readonly location: pulumi.Output; /** * The resource name of the instance. */ readonly name: pulumi.Output; /** * VPC networks to which the instance is connected. For this version, * only a single network is supported. * Structure is documented below. */ readonly networks: pulumi.Output; /** * Performance configuration for the instance. If not provided, * the default performance settings will be used. * Structure is documented below. */ readonly performanceConfig: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Either NFSv3, for using NFS version 3 as file sharing protocol, * or NFSv4.1, for using NFS version 4.1 as file sharing protocol. * NFSv4.1 can be used with HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE. * The default is NFSv3. * Default value is `NFS_V3`. * Possible values are: `NFS_V3`, `NFS_V4_1`. */ readonly protocol: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * A map of resource manager tags. Resource manager tag keys * and values have the same definition as resource manager * tags. Keys must be in the format tagKeys/{tag_key_id}, * and values are in the format tagValues/456. The field is * ignored when empty. The field is immutable and causes * resource replacement when mutated. This field is only set * at create time and modifying this field after creation * will trigger recreation. To apply tags to an existing * resource, see the `gcp.tags.TagValue` resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The service tier of the instance. * Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE */ readonly tier: pulumi.Output; /** * (Optional, Deprecated) * The name of the Filestore zone of the instance. * * > **Warning:** `zone` is deprecated and will be removed in a future major release. Use `location` instead. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ readonly zone: pulumi.Output; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * Creation timestamp in RFC3339 text format. */ createTime?: pulumi.Input; /** * Indicates whether the instance is protected against deletion. */ deletionProtectionEnabled?: pulumi.Input; /** * The reason for enabling deletion protection. */ deletionProtectionReason?: pulumi.Input; /** * A description of the instance. */ description?: pulumi.Input; /** * Directory Services configuration. * Should only be set if protocol is "NFS_V4_1". * Structure is documented below. */ directoryServices?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Output only fields for replication configuration. * Structure is documented below. */ effectiveReplications?: pulumi.Input[]>; /** * Server-specified ETag for the instance resource to prevent * simultaneous updates from overwriting each other. */ etag?: pulumi.Input; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ fileShares?: pulumi.Input; /** * Replication configuration, once set, this cannot be updated. * Additionally this should be specified on the replica instance only, indicating the active as the peerInstance * Structure is documented below. */ initialReplication?: pulumi.Input; /** * KMS key name used for data encryption. */ kmsKeyName?: pulumi.Input; /** * Resource labels to represent user-provided metadata. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the location of the instance. This can be a region for ENTERPRISE tier instances. */ location?: pulumi.Input; /** * The resource name of the instance. */ name?: pulumi.Input; /** * VPC networks to which the instance is connected. For this version, * only a single network is supported. * Structure is documented below. */ networks?: pulumi.Input[]>; /** * Performance configuration for the instance. If not provided, * the default performance settings will be used. * Structure is documented below. */ performanceConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Either NFSv3, for using NFS version 3 as file sharing protocol, * or NFSv4.1, for using NFS version 4.1 as file sharing protocol. * NFSv4.1 can be used with HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE. * The default is NFSv3. * Default value is `NFS_V3`. * Possible values are: `NFS_V3`, `NFS_V4_1`. */ protocol?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A map of resource manager tags. Resource manager tag keys * and values have the same definition as resource manager * tags. Keys must be in the format tagKeys/{tag_key_id}, * and values are in the format tagValues/456. The field is * ignored when empty. The field is immutable and causes * resource replacement when mutated. This field is only set * at create time and modifying this field after creation * will trigger recreation. To apply tags to an existing * resource, see the `gcp.tags.TagValue` resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The service tier of the instance. * Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE */ tier?: pulumi.Input; /** * (Optional, Deprecated) * The name of the Filestore zone of the instance. * * > **Warning:** `zone` is deprecated and will be removed in a future major release. Use `location` instead. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Indicates whether the instance is protected against deletion. */ deletionProtectionEnabled?: pulumi.Input; /** * The reason for enabling deletion protection. */ deletionProtectionReason?: pulumi.Input; /** * A description of the instance. */ description?: pulumi.Input; /** * Directory Services configuration. * Should only be set if protocol is "NFS_V4_1". * Structure is documented below. */ directoryServices?: pulumi.Input; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ fileShares: pulumi.Input; /** * Replication configuration, once set, this cannot be updated. * Additionally this should be specified on the replica instance only, indicating the active as the peerInstance * Structure is documented below. */ initialReplication?: pulumi.Input; /** * KMS key name used for data encryption. */ kmsKeyName?: pulumi.Input; /** * Resource labels to represent user-provided metadata. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the location of the instance. This can be a region for ENTERPRISE tier instances. */ location?: pulumi.Input; /** * The resource name of the instance. */ name?: pulumi.Input; /** * VPC networks to which the instance is connected. For this version, * only a single network is supported. * Structure is documented below. */ networks: pulumi.Input[]>; /** * Performance configuration for the instance. If not provided, * the default performance settings will be used. * Structure is documented below. */ performanceConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Either NFSv3, for using NFS version 3 as file sharing protocol, * or NFSv4.1, for using NFS version 4.1 as file sharing protocol. * NFSv4.1 can be used with HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE. * The default is NFSv3. * Default value is `NFS_V3`. * Possible values are: `NFS_V3`, `NFS_V4_1`. */ protocol?: pulumi.Input; /** * A map of resource manager tags. Resource manager tag keys * and values have the same definition as resource manager * tags. Keys must be in the format tagKeys/{tag_key_id}, * and values are in the format tagValues/456. The field is * ignored when empty. The field is immutable and causes * resource replacement when mutated. This field is only set * at create time and modifying this field after creation * will trigger recreation. To apply tags to an existing * resource, see the `gcp.tags.TagValue` resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The service tier of the instance. * Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE */ tier: pulumi.Input; /** * (Optional, Deprecated) * The name of the Filestore zone of the instance. * * > **Warning:** `zone` is deprecated and will be removed in a future major release. Use `location` instead. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ zone?: pulumi.Input; }