Module redis

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource Instance

class Instance extends CustomResource

A Google Cloud Redis instance.

To get more information about Instance, see:

Example Usage - Redis Instance Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const cache = new gcp.redis.Instance("cache", {
    memorySizeGb: 1,
});

Example Usage - Redis Instance Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const redis-network = gcp.compute.getNetwork({
    name: "redis-test-network",
});
const cache = new gcp.redis.Instance("cache", {
    tier: "STANDARD_HA",
    memorySizeGb: 1,
    locationId: "us-central1-a",
    alternativeLocationId: "us-central1-f",
    authorizedNetwork: redis_network.then(redis_network => redis_network.id),
    redisVersion: "REDIS_3_2",
    displayName: "Test Instance",
    reservedIpRange: "192.168.0.0/29",
    labels: {
        my_key: "myVal",
        other_key: "otherVal",
    },
});

constructor

new Instance(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions)

Create a Instance resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance

Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is 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.

property alternativeLocationId

public alternativeLocationId: pulumi.Output<string>;

Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId].

property authorizedNetwork

public authorizedNetwork: pulumi.Output<string>;

The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.

property connectMode

public connectMode: pulumi.Output<string | undefined>;

The connection mode of the Redis instance.

property createTime

public createTime: pulumi.Output<string>;

The time the instance was created in RFC3339 UTC “Zulu” format, accurate to nanoseconds.

property currentLocationId

public currentLocationId: pulumi.Output<string>;

The current zone where the Redis endpoint is placed. For Basic Tier instances, this will always be the same as the [locationId] provided by the user at creation time. For Standard Tier instances, this can be either [locationId] or [alternativeLocationId] and can change after a failover event.

property displayName

public displayName: pulumi.Output<string | undefined>;

An arbitrary and optional user-provided name for the instance.

property host

public host: pulumi.Output<string>;

Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;

Resource labels to represent user provided metadata.

property locationId

public locationId: pulumi.Output<string>;

The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId].

property memorySizeGb

public memorySizeGb: pulumi.Output<number>;

Redis memory size in GiB.

property name

public name: pulumi.Output<string>;

The ID of the instance or a fully qualified identifier for the instance.

property port

public port: pulumi.Output<number>;

The port number of the exposed Redis endpoint.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property redisConfigs

public redisConfigs: pulumi.Output<{[key: string]: string} | undefined>;

Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs

property redisVersion

public redisVersion: pulumi.Output<string>;

The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS_4_0 for Redis 4.0 compatibility - REDIS_3_2 for Redis 3.2 compatibility

property region

public region: pulumi.Output<string>;

The name of the Redis region of the instance.

property reservedIpRange

public reservedIpRange: pulumi.Output<string>;

The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network.

property tier

public tier: pulumi.Output<string | undefined>;

The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD_HA: highly available primary/replica instances

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface InstanceArgs

interface InstanceArgs

The set of arguments for constructing a Instance resource.

property alternativeLocationId

alternativeLocationId?: pulumi.Input<string>;

Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId].

property authorizedNetwork

authorizedNetwork?: pulumi.Input<string>;

The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.

property connectMode

connectMode?: pulumi.Input<string>;

The connection mode of the Redis instance.

property displayName

displayName?: pulumi.Input<string>;

An arbitrary and optional user-provided name for the instance.

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Resource labels to represent user provided metadata.

property locationId

locationId?: pulumi.Input<string>;

The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId].

property memorySizeGb

memorySizeGb: pulumi.Input<number>;

Redis memory size in GiB.

property name

name?: pulumi.Input<string>;

The ID of the instance or a fully qualified identifier for the instance.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property redisConfigs

redisConfigs?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs

property redisVersion

redisVersion?: pulumi.Input<string>;

The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS_4_0 for Redis 4.0 compatibility - REDIS_3_2 for Redis 3.2 compatibility

property region

region?: pulumi.Input<string>;

The name of the Redis region of the instance.

property reservedIpRange

reservedIpRange?: pulumi.Input<string>;

The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network.

property tier

tier?: pulumi.Input<string>;

The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD_HA: highly available primary/replica instances

interface InstanceState

interface InstanceState

Input properties used for looking up and filtering Instance resources.

property alternativeLocationId

alternativeLocationId?: pulumi.Input<string>;

Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId].

property authorizedNetwork

authorizedNetwork?: pulumi.Input<string>;

The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.

property connectMode

connectMode?: pulumi.Input<string>;

The connection mode of the Redis instance.

property createTime

createTime?: pulumi.Input<string>;

The time the instance was created in RFC3339 UTC “Zulu” format, accurate to nanoseconds.

property currentLocationId

currentLocationId?: pulumi.Input<string>;

The current zone where the Redis endpoint is placed. For Basic Tier instances, this will always be the same as the [locationId] provided by the user at creation time. For Standard Tier instances, this can be either [locationId] or [alternativeLocationId] and can change after a failover event.

property displayName

displayName?: pulumi.Input<string>;

An arbitrary and optional user-provided name for the instance.

property host

host?: pulumi.Input<string>;

Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service.

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Resource labels to represent user provided metadata.

property locationId

locationId?: pulumi.Input<string>;

The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId].

property memorySizeGb

memorySizeGb?: pulumi.Input<number>;

Redis memory size in GiB.

property name

name?: pulumi.Input<string>;

The ID of the instance or a fully qualified identifier for the instance.

property port

port?: pulumi.Input<number>;

The port number of the exposed Redis endpoint.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property redisConfigs

redisConfigs?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs

property redisVersion

redisVersion?: pulumi.Input<string>;

The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS_4_0 for Redis 4.0 compatibility - REDIS_3_2 for Redis 3.2 compatibility

property region

region?: pulumi.Input<string>;

The name of the Redis region of the instance.

property reservedIpRange

reservedIpRange?: pulumi.Input<string>;

The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network.

property tier

tier?: pulumi.Input<string>;

The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD_HA: highly available primary/replica instances