@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
582 lines • 23.1 kB
TypeScript
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}}
* $ pulumi import gcp:filestore/instance:Instance default {{project}}/{{location}}/{{name}}
* $ 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>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: 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>;
/**
* The desiredReplicaState field controls the state of a replica. Terraform will attempt to make the actual state of the replica match the desired state.
*/
readonly desiredReplicaState: pulumi.Output<string | undefined>;
/**
* Directory Services configuration.
* Should only be set if protocol is "NFS_V4_1".
* Structure is documented below.
*/
readonly directoryServices: pulumi.Output<outputs.filestore.InstanceDirectoryServices | 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.
* Additionally this should be specified on the replica instance only, indicating the active as the peerInstance
* Structure is documented below.
*/
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 `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<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.
* Structure is documented below.
*/
readonly performanceConfig: pulumi.Output<outputs.filestore.InstancePerformanceConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
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 is `NFS_V3`.
* Possible values are: `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 `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<string>;
/**
* (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<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 | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Indicates whether the instance is protected against deletion.
*/
deletionProtectionEnabled?: pulumi.Input<boolean | undefined>;
/**
* The reason for enabling deletion protection.
*/
deletionProtectionReason?: pulumi.Input<string | undefined>;
/**
* A description of the instance.
*/
description?: pulumi.Input<string | undefined>;
/**
* The desiredReplicaState field controls the state of a replica. Terraform will attempt to make the actual state of the replica match the desired state.
*/
desiredReplicaState?: pulumi.Input<string | undefined>;
/**
* Directory Services configuration.
* Should only be set if protocol is "NFS_V4_1".
* Structure is documented below.
*/
directoryServices?: pulumi.Input<inputs.filestore.InstanceDirectoryServices | undefined>;
/**
* 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>;
} | undefined>;
/**
* Output only fields for replication configuration.
* Structure is documented below.
*/
effectiveReplications?: pulumi.Input<pulumi.Input<inputs.filestore.InstanceEffectiveReplication>[] | undefined>;
/**
* Server-specified ETag for the instance resource to prevent
* simultaneous updates from overwriting each other.
*/
etag?: pulumi.Input<string | undefined>;
/**
* 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 | undefined>;
/**
* 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<inputs.filestore.InstanceInitialReplication | undefined>;
/**
* KMS key name used for data encryption.
*/
kmsKeyName?: pulumi.Input<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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
*/
location?: pulumi.Input<string | undefined>;
/**
* The resource name of the instance.
*/
name?: pulumi.Input<string | undefined>;
/**
* 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>[] | undefined>;
/**
* Performance configuration for the instance. If not provided,
* the default performance settings will be used.
* Structure is documented below.
*/
performanceConfig?: pulumi.Input<inputs.filestore.InstancePerformanceConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* 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 | undefined>;
/**
* (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<string | undefined>;
}
/**
* The set of arguments for constructing a Instance resource.
*/
export interface InstanceArgs {
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Indicates whether the instance is protected against deletion.
*/
deletionProtectionEnabled?: pulumi.Input<boolean | undefined>;
/**
* The reason for enabling deletion protection.
*/
deletionProtectionReason?: pulumi.Input<string | undefined>;
/**
* A description of the instance.
*/
description?: pulumi.Input<string | undefined>;
/**
* The desiredReplicaState field controls the state of a replica. Terraform will attempt to make the actual state of the replica match the desired state.
*/
desiredReplicaState?: pulumi.Input<string | undefined>;
/**
* Directory Services configuration.
* Should only be set if protocol is "NFS_V4_1".
* Structure is documented below.
*/
directoryServices?: pulumi.Input<inputs.filestore.InstanceDirectoryServices | undefined>;
/**
* 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.
* Additionally this should be specified on the replica instance only, indicating the active as the peerInstance
* Structure is documented below.
*/
initialReplication?: pulumi.Input<inputs.filestore.InstanceInitialReplication | undefined>;
/**
* KMS key name used for data encryption.
*/
kmsKeyName?: pulumi.Input<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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
*/
location?: pulumi.Input<string | undefined>;
/**
* The resource name of the instance.
*/
name?: pulumi.Input<string | undefined>;
/**
* 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.
* Structure is documented below.
*/
performanceConfig?: pulumi.Input<inputs.filestore.InstancePerformanceConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* 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>;
/**
* (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<string | undefined>;
}
//# sourceMappingURL=instance.d.ts.map