Module redis

@pulumi/azure > 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-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class Cache

extends CustomResource

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/redis_cache.html.markdown.

constructor

new Cache(name: string, args: CacheArgs, opts?: pulumi.CustomResourceOptions)

Create a Cache 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?: CacheState, opts?: pulumi.CustomResourceOptions): Cache

Get an existing Cache 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): boolean

Returns true if the given object is an instance of Cache. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property capacity

public capacity: pulumi.Output<number>;

The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4.

property enableNonSslPort

public enableNonSslPort: pulumi.Output<boolean | undefined>;

Enable the non-SSL port (6789) - disabled by default.

property family

public family: pulumi.Output<string>;

The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium)

property hostname

public hostname: pulumi.Output<string>;

The Hostname of the Redis Instance

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 location

public location: pulumi.Output<string>;

The location of the resource group.

property minimumTlsVersion

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

The minimum TLS version. Defaults to 1.0.

property name

public name: pulumi.Output<string>;

The name of the Redis instance. Changing this forces a new resource to be created.

property patchSchedules

public patchSchedules: pulumi.Output<{
    dayOfWeek: string;
    startHourUtc: undefined | number;
}[] | undefined>;

A list of patchSchedule blocks as defined below - only available for Premium SKU’s.

property port

public port: pulumi.Output<number>;

The non-SSL Port of the Redis Instance

property primaryAccessKey

public primaryAccessKey: pulumi.Output<string>;

The Primary Access Key for the Redis Instance

property privateStaticIpAddress

public privateStaticIpAddress: pulumi.Output<string>;

The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.

property redisConfiguration

public redisConfiguration: pulumi.Output<{
    aofBackupEnabled: undefined | false | true;
    aofStorageConnectionString0: undefined | string;
    aofStorageConnectionString1: undefined | string;
    enableAuthentication: undefined | false | true;
    maxclients: number;
    maxfragmentationmemoryReserved: number;
    maxmemoryDelta: number;
    maxmemoryPolicy: undefined | string;
    maxmemoryReserved: number;
    notifyKeyspaceEvents: undefined | string;
    rdbBackupEnabled: undefined | false | true;
    rdbBackupFrequency: undefined | number;
    rdbBackupMaxSnapshotCount: undefined | number;
    rdbStorageConnectionString: undefined | string;
}>;

A redisConfiguration as defined below - with some limitations by SKU - defaults/details are shown below.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which to create the Redis instance.

property secondaryAccessKey

public secondaryAccessKey: pulumi.Output<string>;

The Secondary Access Key for the Redis Instance

property shardCount

public shardCount: pulumi.Output<number | undefined>;

Only available when using the Premium SKU The number of Shards to create on the Redis Cluster.

property skuName

public skuName: pulumi.Output<string>;

The SKU of Redis to use. Possible values are Basic, Standard and Premium.

property sslPort

public sslPort: pulumi.Output<number>;

The SSL Port of the Redis Instance

property subnetId

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

The ID of the Subnet within which the Redis Cache should be deployed. Changing this forces a new resource to be created.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

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

property zones

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

A list of a single item of the Availability Zone which the Redis Cache should be allocated in.

class FirewallRule

extends CustomResource

Manages a Firewall Rule associated with a Redis Cache.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West Europe",
    name: "redis-resourcegroup",
});
const server = new random.RandomId("server", {
    byteLength: 8,
    keepers: {
        azi_id: 1,
    },
});
const testCache = new azure.redis.Cache("test", {
    capacity: 1,
    enableNonSslPort: false,
    family: "P",
    location: testResourceGroup.location,
    name: pulumi.interpolate`redis${server.hex}`,
    redisConfiguration: {
        maxclients: 256,
        maxmemoryDelta: 2,
        maxmemoryPolicy: "allkeys-lru",
        maxmemoryReserved: 2,
    },
    resourceGroupName: testResourceGroup.name,
    skuName: "Premium",
});
const testFirewallRule = new azure.redis.FirewallRule("test", {
    endIp: "2.3.4.5",
    name: "someIPrange",
    redisCacheName: testCache.name,
    resourceGroupName: testResourceGroup.name,
    startIp: "1.2.3.4",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/redis_firewall_rule.html.markdown.

constructor

new FirewallRule(name: string, args: FirewallRuleArgs, opts?: pulumi.CustomResourceOptions)

Create a FirewallRule 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?: FirewallRuleState, opts?: pulumi.CustomResourceOptions): FirewallRule

Get an existing FirewallRule 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): boolean

Returns true if the given object is an instance of FirewallRule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property endIp

public endIp: pulumi.Output<string>;

The highest IP address included in the range.

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 name

public name: pulumi.Output<string>;

The name of the Firewall Rule. Changing this forces a new resource to be created.

property redisCacheName

public redisCacheName: pulumi.Output<string>;

The name of the Redis Cache. Changing this forces a new resource to be created.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which this Redis Cache exists.

property startIp

public startIp: pulumi.Output<string>;

The lowest IP address included in the range

property urn

urn: Output<URN>;

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

function getCache

getCache(args: GetCacheArgs, opts?: pulumi.InvokeOptions): Promise<GetCacheResult> & GetCacheResult

Use this data source to access information about an existing Redis Cache

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

const example = pulumi.output(azure.redis.getCache({
    name: "myrediscache",
    resourceGroupName: "redis-cache",
}));

export const hostname = example.hostname;
export const primaryAccessKey = example.primaryAccessKey;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/redis_cache.html.markdown.

interface CacheArgs

The set of arguments for constructing a Cache resource.

property capacity

capacity: pulumi.Input<number>;

The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4.

property enableNonSslPort

enableNonSslPort?: pulumi.Input<boolean>;

Enable the non-SSL port (6789) - disabled by default.

property family

family: pulumi.Input<string>;

The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium)

property location

location?: pulumi.Input<string>;

The location of the resource group.

property minimumTlsVersion

minimumTlsVersion?: pulumi.Input<string>;

The minimum TLS version. Defaults to 1.0.

property name

name?: pulumi.Input<string>;

The name of the Redis instance. Changing this forces a new resource to be created.

property patchSchedules

patchSchedules?: pulumi.Input<pulumi.Input<{
    dayOfWeek: pulumi.Input<string>;
    startHourUtc: pulumi.Input<number>;
}>[]>;

A list of patchSchedule blocks as defined below - only available for Premium SKU’s.

property privateStaticIpAddress

privateStaticIpAddress?: pulumi.Input<string>;

The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.

property redisConfiguration

redisConfiguration?: pulumi.Input<{
    aofBackupEnabled: pulumi.Input<boolean>;
    aofStorageConnectionString0: pulumi.Input<string>;
    aofStorageConnectionString1: pulumi.Input<string>;
    enableAuthentication: pulumi.Input<boolean>;
    maxclients: pulumi.Input<number>;
    maxfragmentationmemoryReserved: pulumi.Input<number>;
    maxmemoryDelta: pulumi.Input<number>;
    maxmemoryPolicy: pulumi.Input<string>;
    maxmemoryReserved: pulumi.Input<number>;
    notifyKeyspaceEvents: pulumi.Input<string>;
    rdbBackupEnabled: pulumi.Input<boolean>;
    rdbBackupFrequency: pulumi.Input<number>;
    rdbBackupMaxSnapshotCount: pulumi.Input<number>;
    rdbStorageConnectionString: pulumi.Input<string>;
}>;

A redisConfiguration as defined below - with some limitations by SKU - defaults/details are shown below.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which to create the Redis instance.

property shardCount

shardCount?: pulumi.Input<number>;

Only available when using the Premium SKU The number of Shards to create on the Redis Cluster.

property skuName

skuName: pulumi.Input<string>;

The SKU of Redis to use. Possible values are Basic, Standard and Premium.

property subnetId

subnetId?: pulumi.Input<string>;

The ID of the Subnet within which the Redis Cache should be deployed. Changing this forces a new resource to be created.

property tags

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

A mapping of tags to assign to the resource.

property zones

zones?: pulumi.Input<string>;

A list of a single item of the Availability Zone which the Redis Cache should be allocated in.

interface CacheState

Input properties used for looking up and filtering Cache resources.

property capacity

capacity?: pulumi.Input<number>;

The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4.

property enableNonSslPort

enableNonSslPort?: pulumi.Input<boolean>;

Enable the non-SSL port (6789) - disabled by default.

property family

family?: pulumi.Input<string>;

The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium)

property hostname

hostname?: pulumi.Input<string>;

The Hostname of the Redis Instance

property location

location?: pulumi.Input<string>;

The location of the resource group.

property minimumTlsVersion

minimumTlsVersion?: pulumi.Input<string>;

The minimum TLS version. Defaults to 1.0.

property name

name?: pulumi.Input<string>;

The name of the Redis instance. Changing this forces a new resource to be created.

property patchSchedules

patchSchedules?: pulumi.Input<pulumi.Input<{
    dayOfWeek: pulumi.Input<string>;
    startHourUtc: pulumi.Input<number>;
}>[]>;

A list of patchSchedule blocks as defined below - only available for Premium SKU’s.

property port

port?: pulumi.Input<number>;

The non-SSL Port of the Redis Instance

property primaryAccessKey

primaryAccessKey?: pulumi.Input<string>;

The Primary Access Key for the Redis Instance

property privateStaticIpAddress

privateStaticIpAddress?: pulumi.Input<string>;

The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.

property redisConfiguration

redisConfiguration?: pulumi.Input<{
    aofBackupEnabled: pulumi.Input<boolean>;
    aofStorageConnectionString0: pulumi.Input<string>;
    aofStorageConnectionString1: pulumi.Input<string>;
    enableAuthentication: pulumi.Input<boolean>;
    maxclients: pulumi.Input<number>;
    maxfragmentationmemoryReserved: pulumi.Input<number>;
    maxmemoryDelta: pulumi.Input<number>;
    maxmemoryPolicy: pulumi.Input<string>;
    maxmemoryReserved: pulumi.Input<number>;
    notifyKeyspaceEvents: pulumi.Input<string>;
    rdbBackupEnabled: pulumi.Input<boolean>;
    rdbBackupFrequency: pulumi.Input<number>;
    rdbBackupMaxSnapshotCount: pulumi.Input<number>;
    rdbStorageConnectionString: pulumi.Input<string>;
}>;

A redisConfiguration as defined below - with some limitations by SKU - defaults/details are shown below.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which to create the Redis instance.

property secondaryAccessKey

secondaryAccessKey?: pulumi.Input<string>;

The Secondary Access Key for the Redis Instance

property shardCount

shardCount?: pulumi.Input<number>;

Only available when using the Premium SKU The number of Shards to create on the Redis Cluster.

property skuName

skuName?: pulumi.Input<string>;

The SKU of Redis to use. Possible values are Basic, Standard and Premium.

property sslPort

sslPort?: pulumi.Input<number>;

The SSL Port of the Redis Instance

property subnetId

subnetId?: pulumi.Input<string>;

The ID of the Subnet within which the Redis Cache should be deployed. Changing this forces a new resource to be created.

property tags

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

A mapping of tags to assign to the resource.

property zones

zones?: pulumi.Input<string>;

A list of a single item of the Availability Zone which the Redis Cache should be allocated in.

interface FirewallRuleArgs

The set of arguments for constructing a FirewallRule resource.

property endIp

endIp: pulumi.Input<string>;

The highest IP address included in the range.

property name

name?: pulumi.Input<string>;

The name of the Firewall Rule. Changing this forces a new resource to be created.

property redisCacheName

redisCacheName: pulumi.Input<string>;

The name of the Redis Cache. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which this Redis Cache exists.

property startIp

startIp: pulumi.Input<string>;

The lowest IP address included in the range

interface FirewallRuleState

Input properties used for looking up and filtering FirewallRule resources.

property endIp

endIp?: pulumi.Input<string>;

The highest IP address included in the range.

property name

name?: pulumi.Input<string>;

The name of the Firewall Rule. Changing this forces a new resource to be created.

property redisCacheName

redisCacheName?: pulumi.Input<string>;

The name of the Redis Cache. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which this Redis Cache exists.

property startIp

startIp?: pulumi.Input<string>;

The lowest IP address included in the range

interface GetCacheArgs

A collection of arguments for invoking getCache.

property name

name: string;

The name of the Redis cache

property resourceGroupName

resourceGroupName: string;

The name of the resource group the Redis cache instance is located in.

property zones

zones?: string[];

interface GetCacheResult

A collection of values returned by getCache.

property capacity

capacity: number;

The size of the Redis Cache deployed.

property enableNonSslPort

enableNonSslPort: boolean;

Whether the SSL port is enabled.

property family

family: string;

The SKU family/pricing group used. Possible values are C (for Basic/Standard SKU family) and P (for Premium)

property hostname

hostname: string;

The Hostname of the Redis Instance

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property location

location: string;

The location of the Redis Cache.

property minimumTlsVersion

minimumTlsVersion: string;

The minimum TLS version.

property name

name: string;

property patchSchedules

patchSchedules: {
    dayOfWeek: string;
    startHourUtc: number;
}[];

A list of patchSchedule blocks as defined below - only available for Premium SKU’s.

property port

port: number;

The non-SSL Port of the Redis Instance

property primaryAccessKey

primaryAccessKey: string;

The Primary Access Key for the Redis Instance

property privateStaticIpAddress

privateStaticIpAddress: string;

property redisConfigurations

redisConfigurations: {
    aofBackupEnabled: boolean;
    aofStorageConnectionString0: string;
    aofStorageConnectionString1: string;
    enableAuthentication: boolean;
    maxclients: number;
    maxfragmentationmemoryReserved: number;
    maxmemoryDelta: number;
    maxmemoryPolicy: string;
    maxmemoryReserved: number;
    notifyKeyspaceEvents: string;
    rdbBackupEnabled: boolean;
    rdbBackupFrequency: number;
    rdbBackupMaxSnapshotCount: number;
    rdbStorageConnectionString: string;
}[];

A redisConfiguration block as defined below.

property resourceGroupName

resourceGroupName: string;

property secondaryAccessKey

secondaryAccessKey: string;

The Secondary Access Key for the Redis Instance

property shardCount

shardCount: number;

property skuName

skuName: string;

The SKU of Redis used. Possible values are Basic, Standard and Premium.

property sslPort

sslPort: number;

The SSL Port of the Redis Instance

property subnetId

subnetId: string;

property tags

tags: {[key: string]: any};

property zones

zones: string[];