DatabaseRedisConfig

class DatabaseRedisConfig : KotlinCustomResource

Provides a virtual resource that can be used to change advanced configuration options for a DigitalOcean managed Redis database cluster.

Note Redis configurations are only removed from state when destroyed. The remote configuration is not unset.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", {
name: "example-redis-cluster",
engine: "redis",
version: "7",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
});
const example = new digitalocean.DatabaseRedisConfig("example", {
clusterId: exampleDatabaseCluster.id,
maxmemoryPolicy: "allkeys-lru",
notifyKeyspaceEvents: "KEA",
timeout: 90,
});
import pulumi
import pulumi_digitalocean as digitalocean
example_database_cluster = digitalocean.DatabaseCluster("example",
name="example-redis-cluster",
engine="redis",
version="7",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=1)
example = digitalocean.DatabaseRedisConfig("example",
cluster_id=example_database_cluster.id,
maxmemory_policy="allkeys-lru",
notify_keyspace_events="KEA",
timeout=90)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var exampleDatabaseCluster = new DigitalOcean.DatabaseCluster("example", new()
{
Name = "example-redis-cluster",
Engine = "redis",
Version = "7",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
var example = new DigitalOcean.DatabaseRedisConfig("example", new()
{
ClusterId = exampleDatabaseCluster.Id,
MaxmemoryPolicy = "allkeys-lru",
NotifyKeyspaceEvents = "KEA",
Timeout = 90,
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleDatabaseCluster, err := digitalocean.NewDatabaseCluster(ctx, "example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-redis-cluster"),
Engine: pulumi.String("redis"),
Version: pulumi.String("7"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = digitalocean.NewDatabaseRedisConfig(ctx, "example", &digitalocean.DatabaseRedisConfigArgs{
ClusterId: exampleDatabaseCluster.ID(),
MaxmemoryPolicy: pulumi.String("allkeys-lru"),
NotifyKeyspaceEvents: pulumi.String("KEA"),
Timeout: pulumi.Int(90),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DatabaseCluster;
import com.pulumi.digitalocean.DatabaseClusterArgs;
import com.pulumi.digitalocean.DatabaseRedisConfig;
import com.pulumi.digitalocean.DatabaseRedisConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleDatabaseCluster = new DatabaseCluster("exampleDatabaseCluster", DatabaseClusterArgs.builder()
.name("example-redis-cluster")
.engine("redis")
.version("7")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
var example = new DatabaseRedisConfig("example", DatabaseRedisConfigArgs.builder()
.clusterId(exampleDatabaseCluster.id())
.maxmemoryPolicy("allkeys-lru")
.notifyKeyspaceEvents("KEA")
.timeout(90)
.build());
}
}
resources:
example:
type: digitalocean:DatabaseRedisConfig
properties:
clusterId: ${exampleDatabaseCluster.id}
maxmemoryPolicy: allkeys-lru
notifyKeyspaceEvents: KEA
timeout: 90
exampleDatabaseCluster:
type: digitalocean:DatabaseCluster
name: example
properties:
name: example-redis-cluster
engine: redis
version: '7'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1

Import

A Redis database cluster's configuration can be imported using the id the parent cluster, e.g.

$ pulumi import digitalocean:index/databaseRedisConfig:DatabaseRedisConfig example 245bcfd0-7f31-4ce6-a2bc-475a116cca97

Properties

Link copied to clipboard

Determines default pub/sub channels' ACL for new users if an ACL is not supplied. When this option is not defined, allchannels is assumed to keep backward compatibility. This option doesn't affect Redis' acl-pubsub-default configuration. Supported values are: allchannels and resetchannels

Link copied to clipboard
val clusterId: Output<String>

The ID of the target Redis cluster.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ioThreads: Output<Int>

The Redis IO thread count.

Link copied to clipboard
val lfuDecayTime: Output<Int>

The LFU maxmemory policy counter decay time in minutes.

Link copied to clipboard
val lfuLogFactor: Output<Int>

The counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory policies.

Link copied to clipboard
val maxmemoryPolicy: Output<String>

A string specifying the desired eviction policy for the Redis cluster.Supported values are: noeviction, allkeys-lru, allkeys-random, volatile-lru, volatile-random, volatile-ttl

Link copied to clipboard

The notify-keyspace-events option. Requires at least K or E.

Link copied to clipboard
val numberOfDatabases: Output<Int>

The number of Redis databases. Changing this will cause a restart of Redis service.

Link copied to clipboard
val persistence: Output<String>

When persistence is rdb, Redis does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to backup schedule for backup purposes. When persistence is off, no RDB dumps and backups are done, so data can be lost at any moment if service is restarted for any reason, or if service is powered off. Also service can't be forked.

Link copied to clipboard

The output buffer limit for pub/sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ssl: Output<Boolean>

A boolean indicating whether to require SSL to access Redis.

Link copied to clipboard
val timeout: Output<Int>

The Redis idle connection timeout in seconds.

Link copied to clipboard
val urn: Output<String>