@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
454 lines • 18.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Google Cloud Memcache instance.
*
* To get more information about Instance, see:
*
* * [API documentation](https://cloud.google.com/memorystore/docs/memcached/reference/rest/v1/projects.locations.instances)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/memcache/docs/creating-instances)
*
* ## Example Usage
*
* ### Memcache Instance Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* // This example assumes this network already exists.
* // The API creates a tenant network per network authorized for a
* // Memcache instance and that network is not deleted when the user-created
* // network (authorized_network) is deleted, so this prevents issues
* // with tenant network quota.
* // If this network hasn't been created and you are using this example in your
* // config, add an additional network resource or change
* // this from "data"to "resource"
* const memcacheNetwork = new gcp.compute.Network("memcache_network", {name: "test-network"});
* const serviceRange = new gcp.compute.GlobalAddress("service_range", {
* name: "address",
* purpose: "VPC_PEERING",
* addressType: "INTERNAL",
* prefixLength: 16,
* network: memcacheNetwork.id,
* });
* const privateServiceConnection = new gcp.servicenetworking.Connection("private_service_connection", {
* network: memcacheNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [serviceRange.name],
* });
* const instance = new gcp.memcache.Instance("instance", {
* name: "test-instance",
* authorizedNetwork: privateServiceConnection.network,
* deletionProtection: false,
* labels: {
* env: "test",
* },
* nodeConfig: {
* cpuCount: 1,
* memorySizeMb: 1024,
* },
* nodeCount: 1,
* memcacheVersion: "MEMCACHE_1_5",
* maintenancePolicy: {
* weeklyMaintenanceWindows: [{
* day: "SATURDAY",
* duration: "14400s",
* startTime: {
* hours: 0,
* minutes: 30,
* seconds: 0,
* nanos: 0,
* },
* }],
* },
* });
* ```
*
* ## Import
*
* Instance can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{region}}/instances/{{name}}`
* * `{{project}}/{{region}}/{{name}}`
* * `{{region}}/{{name}}`
* * `{{name}}`
*
* When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:memcache/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}}
* $ pulumi import gcp:memcache/instance:Instance default {{project}}/{{region}}/{{name}}
* $ pulumi import gcp:memcache/instance:Instance default {{region}}/{{name}}
* $ pulumi import gcp:memcache/instance:Instance default {{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;
/**
* The full name of the GCE network to connect the instance to. If not provided,
* 'default' will be used.
*/
readonly authorizedNetwork: pulumi.Output<string>;
/**
* 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>;
/**
* Whether Terraform will be prevented from destroying the instance.
* When a `terraform destroy` or `pulumi up` would delete the instance,
* the command will fail if this field is not set to false in Terraform state.
* When the field is set to true or unset in Terraform state, a `pulumi up`
* or `terraform destroy` that would delete the instance will fail.
* When the field is set to false, deleting the instance is allowed.
*/
readonly deletionProtection: pulumi.Output<boolean | undefined>;
/**
* Endpoint for Discovery API
*/
readonly discoveryEndpoint: pulumi.Output<string>;
/**
* A user-visible name for the instance.
*/
readonly displayName: pulumi.Output<string>;
/**
* 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;
}>;
/**
* 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>;
/**
* Maintenance policy for an instance.
* Structure is documented below.
*/
readonly maintenancePolicy: pulumi.Output<outputs.memcache.InstanceMaintenancePolicy | undefined>;
/**
* Output only. Published maintenance schedule.
* Structure is documented below.
*/
readonly maintenanceSchedules: pulumi.Output<outputs.memcache.InstanceMaintenanceSchedule[]>;
/**
* The full version of memcached server running on this instance.
*/
readonly memcacheFullVersion: pulumi.Output<string>;
/**
* Additional information about the instance state, if available.
* Structure is documented below.
*/
readonly memcacheNodes: pulumi.Output<outputs.memcache.InstanceMemcacheNode[]>;
/**
* User-specified parameters for this memcache instance.
* Structure is documented below.
*/
readonly memcacheParameters: pulumi.Output<outputs.memcache.InstanceMemcacheParameters | undefined>;
/**
* The major version of Memcached software. If not provided, latest supported version will be used.
* Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically
* determined by our system based on the latest supported minor version.
* Default value is `MEMCACHE_1_5`.
* Possible values are: `MEMCACHE_1_5`, `MEMCACHE_1_6_15`.
*/
readonly memcacheVersion: pulumi.Output<string | undefined>;
/**
* The resource name of the instance.
*/
readonly name: pulumi.Output<string>;
/**
* Configuration for memcache nodes.
* Structure is documented below.
*/
readonly nodeConfig: pulumi.Output<outputs.memcache.InstanceNodeConfig>;
/**
* Number of nodes in the memcache instance.
*/
readonly nodeCount: pulumi.Output<number>;
/**
* 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>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The region of the Memcache instance. If it is not provided, the provider region is used.
*/
readonly region: pulumi.Output<string>;
/**
* Contains the name of allocated IP address ranges associated with
* the private service access connection for example, "test-default"
* associated with IP range 10.0.0.0/29.
*/
readonly reservedIpRangeIds: pulumi.Output<string[] | undefined>;
/**
* Zones where memcache nodes should be provisioned. If not
* provided, all zones will be used.
*/
readonly zones: 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 {
/**
* The full name of the GCE network to connect the instance to. If not provided,
* 'default' will be used.
*/
authorizedNetwork?: pulumi.Input<string | undefined>;
/**
* 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>;
/**
* Whether Terraform will be prevented from destroying the instance.
* When a `terraform destroy` or `pulumi up` would delete the instance,
* the command will fail if this field is not set to false in Terraform state.
* When the field is set to true or unset in Terraform state, a `pulumi up`
* or `terraform destroy` that would delete the instance will fail.
* When the field is set to false, deleting the instance is allowed.
*/
deletionProtection?: pulumi.Input<boolean | undefined>;
/**
* Endpoint for Discovery API
*/
discoveryEndpoint?: pulumi.Input<string | undefined>;
/**
* A user-visible name for the instance.
*/
displayName?: pulumi.Input<string | 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>;
/**
* 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>;
/**
* Maintenance policy for an instance.
* Structure is documented below.
*/
maintenancePolicy?: pulumi.Input<inputs.memcache.InstanceMaintenancePolicy | undefined>;
/**
* Output only. Published maintenance schedule.
* Structure is documented below.
*/
maintenanceSchedules?: pulumi.Input<pulumi.Input<inputs.memcache.InstanceMaintenanceSchedule>[] | undefined>;
/**
* The full version of memcached server running on this instance.
*/
memcacheFullVersion?: pulumi.Input<string | undefined>;
/**
* Additional information about the instance state, if available.
* Structure is documented below.
*/
memcacheNodes?: pulumi.Input<pulumi.Input<inputs.memcache.InstanceMemcacheNode>[] | undefined>;
/**
* User-specified parameters for this memcache instance.
* Structure is documented below.
*/
memcacheParameters?: pulumi.Input<inputs.memcache.InstanceMemcacheParameters | undefined>;
/**
* The major version of Memcached software. If not provided, latest supported version will be used.
* Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically
* determined by our system based on the latest supported minor version.
* Default value is `MEMCACHE_1_5`.
* Possible values are: `MEMCACHE_1_5`, `MEMCACHE_1_6_15`.
*/
memcacheVersion?: pulumi.Input<string | undefined>;
/**
* The resource name of the instance.
*/
name?: pulumi.Input<string | undefined>;
/**
* Configuration for memcache nodes.
* Structure is documented below.
*/
nodeConfig?: pulumi.Input<inputs.memcache.InstanceNodeConfig | undefined>;
/**
* Number of nodes in the memcache instance.
*/
nodeCount?: pulumi.Input<number | 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>;
/**
* 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>;
/**
* The region of the Memcache instance. If it is not provided, the provider region is used.
*/
region?: pulumi.Input<string | undefined>;
/**
* Contains the name of allocated IP address ranges associated with
* the private service access connection for example, "test-default"
* associated with IP range 10.0.0.0/29.
*/
reservedIpRangeIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Zones where memcache nodes should be provisioned. If not
* provided, all zones will be used.
*/
zones?: pulumi.Input<pulumi.Input<string>[] | undefined>;
}
/**
* The set of arguments for constructing a Instance resource.
*/
export interface InstanceArgs {
/**
* The full name of the GCE network to connect the instance to. If not provided,
* 'default' will be used.
*/
authorizedNetwork?: 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>;
/**
* Whether Terraform will be prevented from destroying the instance.
* When a `terraform destroy` or `pulumi up` would delete the instance,
* the command will fail if this field is not set to false in Terraform state.
* When the field is set to true or unset in Terraform state, a `pulumi up`
* or `terraform destroy` that would delete the instance will fail.
* When the field is set to false, deleting the instance is allowed.
*/
deletionProtection?: pulumi.Input<boolean | undefined>;
/**
* A user-visible name for the instance.
*/
displayName?: 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>;
/**
* Maintenance policy for an instance.
* Structure is documented below.
*/
maintenancePolicy?: pulumi.Input<inputs.memcache.InstanceMaintenancePolicy | undefined>;
/**
* User-specified parameters for this memcache instance.
* Structure is documented below.
*/
memcacheParameters?: pulumi.Input<inputs.memcache.InstanceMemcacheParameters | undefined>;
/**
* The major version of Memcached software. If not provided, latest supported version will be used.
* Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically
* determined by our system based on the latest supported minor version.
* Default value is `MEMCACHE_1_5`.
* Possible values are: `MEMCACHE_1_5`, `MEMCACHE_1_6_15`.
*/
memcacheVersion?: pulumi.Input<string | undefined>;
/**
* The resource name of the instance.
*/
name?: pulumi.Input<string | undefined>;
/**
* Configuration for memcache nodes.
* Structure is documented below.
*/
nodeConfig: pulumi.Input<inputs.memcache.InstanceNodeConfig>;
/**
* Number of nodes in the memcache instance.
*/
nodeCount: pulumi.Input<number>;
/**
* 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>;
/**
* The region of the Memcache instance. If it is not provided, the provider region is used.
*/
region?: pulumi.Input<string | undefined>;
/**
* Contains the name of allocated IP address ranges associated with
* the private service access connection for example, "test-default"
* associated with IP range 10.0.0.0/29.
*/
reservedIpRangeIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Zones where memcache nodes should be provisioned. If not
* provided, all zones will be used.
*/
zones?: pulumi.Input<pulumi.Input<string>[] | undefined>;
}
//# sourceMappingURL=instance.d.ts.map