UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

479 lines (478 loc) • 18.4 kB
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<pulumi.ID>, 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<string>; /** * Indicates whether the instance is protected against deletion. */ readonly deletionProtectionEnabled: pulumi.Output<boolean | undefined>; /** * The reason for enabling deletion protection. */ readonly deletionProtectionReason: pulumi.Output<string | undefined>; /** * A description of the instance. */ readonly description: pulumi.Output<string | undefined>; /** * 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<outputs.filestore.InstanceEffectiveReplication[]>; /** * Server-specified ETag for the instance resource to prevent * simultaneous updates from overwriting each other. */ readonly etag: pulumi.Output<string>; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ readonly fileShares: pulumi.Output<outputs.filestore.InstanceFileShares>; /** * Replication configuration, once set, this cannot be updated. Addtionally this should be specified on the replica * instance only, indicating the active as the peer_instance */ readonly initialReplication: pulumi.Output<outputs.filestore.InstanceInitialReplication | undefined>; /** * KMS key name used for data encryption. */ readonly kmsKeyName: pulumi.Output<string | undefined>; /** * 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 'effective_labels' 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<string>; /** * The resource name of the instance. */ readonly name: pulumi.Output<string>; /** * 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<outputs.filestore.InstanceNetwork[]>; /** * Performance configuration for the instance. If not provided, the default performance settings will be used. */ readonly performanceConfig: pulumi.Output<outputs.filestore.InstancePerformanceConfig | undefined>; readonly project: pulumi.Output<string>; /** * 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: * "NFS_V3" Possible values: ["NFS_V3", "NFS_V4_1"] */ readonly protocol: pulumi.Output<string | undefined>; /** * 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 * 'google_tags_tag_value' 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<string>; /** * The name of the Filestore zone of the instance. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ readonly zone: pulumi.Output<string>; /** * 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<string>; /** * Indicates whether the instance is protected against deletion. */ deletionProtectionEnabled?: pulumi.Input<boolean>; /** * The reason for enabling deletion protection. */ deletionProtectionReason?: pulumi.Input<string>; /** * A description of the instance. */ description?: pulumi.Input<string>; /** * 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<string>; }>; /** * Output only fields for replication configuration. * Structure is documented below. */ effectiveReplications?: pulumi.Input<pulumi.Input<inputs.filestore.InstanceEffectiveReplication>[]>; /** * Server-specified ETag for the instance resource to prevent * simultaneous updates from overwriting each other. */ etag?: pulumi.Input<string>; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ fileShares?: pulumi.Input<inputs.filestore.InstanceFileShares>; /** * Replication configuration, once set, this cannot be updated. Addtionally this should be specified on the replica * instance only, indicating the active as the peer_instance */ initialReplication?: pulumi.Input<inputs.filestore.InstanceInitialReplication>; /** * KMS key name used for data encryption. */ kmsKeyName?: pulumi.Input<string>; /** * 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 'effective_labels' for all of the labels present on the * resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The name of the location of the instance. This can be a region for ENTERPRISE tier instances. */ location?: pulumi.Input<string>; /** * The resource name of the instance. */ name?: pulumi.Input<string>; /** * VPC networks to which the instance is connected. For this version, * only a single network is supported. * Structure is documented below. */ networks?: pulumi.Input<pulumi.Input<inputs.filestore.InstanceNetwork>[]>; /** * Performance configuration for the instance. If not provided, the default performance settings will be used. */ performanceConfig?: pulumi.Input<inputs.filestore.InstancePerformanceConfig>; project?: pulumi.Input<string>; /** * 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: * "NFS_V3" Possible values: ["NFS_V3", "NFS_V4_1"] */ protocol?: pulumi.Input<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<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 * 'google_tags_tag_value' resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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<string>; /** * The name of the Filestore zone of the instance. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ zone?: pulumi.Input<string>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Indicates whether the instance is protected against deletion. */ deletionProtectionEnabled?: pulumi.Input<boolean>; /** * The reason for enabling deletion protection. */ deletionProtectionReason?: pulumi.Input<string>; /** * A description of the instance. */ description?: pulumi.Input<string>; /** * File system shares on the instance. For this version, only a * single file share is supported. * Structure is documented below. */ fileShares: pulumi.Input<inputs.filestore.InstanceFileShares>; /** * Replication configuration, once set, this cannot be updated. Addtionally this should be specified on the replica * instance only, indicating the active as the peer_instance */ initialReplication?: pulumi.Input<inputs.filestore.InstanceInitialReplication>; /** * KMS key name used for data encryption. */ kmsKeyName?: pulumi.Input<string>; /** * 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 'effective_labels' for all of the labels present on the * resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The name of the location of the instance. This can be a region for ENTERPRISE tier instances. */ location?: pulumi.Input<string>; /** * The resource name of the instance. */ name?: pulumi.Input<string>; /** * VPC networks to which the instance is connected. For this version, * only a single network is supported. * Structure is documented below. */ networks: pulumi.Input<pulumi.Input<inputs.filestore.InstanceNetwork>[]>; /** * Performance configuration for the instance. If not provided, the default performance settings will be used. */ performanceConfig?: pulumi.Input<inputs.filestore.InstancePerformanceConfig>; project?: pulumi.Input<string>; /** * 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: * "NFS_V3" Possible values: ["NFS_V3", "NFS_V4_1"] */ protocol?: pulumi.Input<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 * 'google_tags_tag_value' resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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<string>; /** * The name of the Filestore zone of the instance. * * @deprecated `zone` is deprecated and will be removed in a future major release. Use `location` instead. */ zone?: pulumi.Input<string>; }