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.

redis

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

class pulumi_gcp.redis.Instance(resource_name, opts=None, alternative_location_id=None, authorized_network=None, connect_mode=None, display_name=None, labels=None, location_id=None, memory_size_gb=None, name=None, project=None, redis_configs=None, redis_version=None, region=None, reserved_ip_range=None, tier=None, __props__=None, __name__=None, __opts__=None)

A Google Cloud Redis instance.

To get more information about Instance, see:

import pulumi
import pulumi_gcp as gcp

cache = gcp.redis.Instance("cache", memory_size_gb=1)
import pulumi
import pulumi_gcp as gcp

redis_network = gcp.compute.get_network(name="redis-test-network")
cache = gcp.redis.Instance("cache",
    tier="STANDARD_HA",
    memory_size_gb=1,
    location_id="us-central1-a",
    alternative_location_id="us-central1-f",
    authorized_network=redis_network.id,
    redis_version="REDIS_3_2",
    display_name="Test Instance",
    reserved_ip_range="192.168.0.0/29",
    labels={
        "my_key": "my_val",
        "other_key": "other_val",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • alternative_location_id (pulumi.Input[str]) – 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].

  • authorized_network (pulumi.Input[str]) – The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.

  • connect_mode (pulumi.Input[str]) – The connection mode of the Redis instance.

  • display_name (pulumi.Input[str]) – An arbitrary and optional user-provided name for the instance.

  • labels (pulumi.Input[dict]) – Resource labels to represent user provided metadata.

  • location_id (pulumi.Input[str]) – 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].

  • memory_size_gb (pulumi.Input[float]) – Redis memory size in GiB.

  • name (pulumi.Input[str]) – The ID of the instance or a fully qualified identifier for the instance.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • redis_configs (pulumi.Input[dict]) – 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

  • redis_version (pulumi.Input[str]) – 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
Parameters
  • region (pulumi.Input[str]) – The name of the Redis region of the instance.

  • reserved_ip_range (pulumi.Input[str]) – 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.

  • tier (pulumi.Input[str]) – The service tier of the instance. Must be one of these values:

- BASIC: standalone instance
- STANDARD_HA: highly available primary/replica instances
alternative_location_id: pulumi.Output[str] = None

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].

authorized_network: pulumi.Output[str] = None

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

connect_mode: pulumi.Output[str] = None

The connection mode of the Redis instance.

create_time: pulumi.Output[str] = None

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

current_location_id: pulumi.Output[str] = None

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.

display_name: pulumi.Output[str] = None

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

host: pulumi.Output[str] = None

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

labels: pulumi.Output[dict] = None

Resource labels to represent user provided metadata.

location_id: pulumi.Output[str] = None

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].

memory_size_gb: pulumi.Output[float] = None

Redis memory size in GiB.

name: pulumi.Output[str] = None

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

port: pulumi.Output[float] = None

The port number of the exposed Redis endpoint.

project: pulumi.Output[str] = None

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

redis_configs: pulumi.Output[dict] = None

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

redis_version: pulumi.Output[str] = None

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

region: pulumi.Output[str] = None

The name of the Redis region of the instance.

reserved_ip_range: pulumi.Output[str] = None

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.

tier: pulumi.Output[str] = None

The service tier of the instance. Must be one of these values:

  • BASIC: standalone instance

  • STANDARD_HA: highly available primary/replica instances

static get(resource_name, id, opts=None, alternative_location_id=None, authorized_network=None, connect_mode=None, create_time=None, current_location_id=None, display_name=None, host=None, labels=None, location_id=None, memory_size_gb=None, name=None, port=None, project=None, redis_configs=None, redis_version=None, region=None, reserved_ip_range=None, tier=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • alternative_location_id (pulumi.Input[str]) – 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].

  • authorized_network (pulumi.Input[str]) – The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.

  • connect_mode (pulumi.Input[str]) – The connection mode of the Redis instance.

  • create_time (pulumi.Input[str]) – The time the instance was created in RFC3339 UTC “Zulu” format, accurate to nanoseconds.

  • current_location_id (pulumi.Input[str]) – 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.

  • display_name (pulumi.Input[str]) – An arbitrary and optional user-provided name for the instance.

  • host (pulumi.Input[str]) – Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service.

  • labels (pulumi.Input[dict]) – Resource labels to represent user provided metadata.

  • location_id (pulumi.Input[str]) – 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].

  • memory_size_gb (pulumi.Input[float]) – Redis memory size in GiB.

  • name (pulumi.Input[str]) – The ID of the instance or a fully qualified identifier for the instance.

  • port (pulumi.Input[float]) – The port number of the exposed Redis endpoint.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • redis_configs (pulumi.Input[dict]) – 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

  • redis_version (pulumi.Input[str]) – 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
Parameters
  • region (pulumi.Input[str]) – The name of the Redis region of the instance.

  • reserved_ip_range (pulumi.Input[str]) – 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.

  • tier (pulumi.Input[str]) – The service tier of the instance. Must be one of these values:

- BASIC: standalone instance
- STANDARD_HA: highly available primary/replica instances
translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str