UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

228 lines (227 loc) • 11.3 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a virtual resource that can be used to change advanced configuration * options for a DigitalOcean managed Valkey database cluster. * * > **Note** Valkey configurations are only removed from state when destroyed. The remote configuration is not unset. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", { * name: "example-valkey-cluster", * engine: "valkey", * version: "8", * size: digitalocean.DatabaseSlug.DB_1VPCU1GB, * region: digitalocean.Region.NYC1, * nodeCount: 1, * }); * const example = new digitalocean.DatabaseValkeyConfig("example", { * clusterId: exampleDatabaseCluster.id, * notifyKeyspaceEvents: "KEA", * timeout: 90, * }); * ``` * * ## Import * * A Valkey database cluster's configuration can be imported using the `id` the parent cluster, e.g. * * ```sh * $ pulumi import digitalocean:index/databaseValkeyConfig:DatabaseValkeyConfig example 245bcfd0-7f31-4ce6-a2bc-475a116cca97 * ``` */ export declare class DatabaseValkeyConfig extends pulumi.CustomResource { /** * Get an existing DatabaseValkeyConfig 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?: DatabaseValkeyConfigState, opts?: pulumi.CustomResourceOptions): DatabaseValkeyConfig; /** * Returns true if the given object is an instance of DatabaseValkeyConfig. 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 DatabaseValkeyConfig; /** * 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 Valkey' `acl-pubsub-default` configuration. Supported values are: `allchannels` and `resetchannels` */ readonly aclChannelsDefault: pulumi.Output<string>; /** * The ID of the target Valkey cluster. */ readonly clusterId: pulumi.Output<string>; /** * Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkeyPersistence is set to off. */ readonly frequentSnapshots: pulumi.Output<boolean>; /** * The Valkey IO thread count. */ readonly ioThreads: pulumi.Output<number>; /** * The LFU maxmemory policy counter decay time in minutes. */ readonly lfuDecayTime: pulumi.Output<number>; /** * The counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory policies. */ readonly lfuLogFactor: pulumi.Output<number>; /** * The `notify-keyspace-events` option. Requires at least `K` or `E`. */ readonly notifyKeyspaceEvents: pulumi.Output<string>; /** * The number of Valkey databases. Changing this will cause a restart of Valkey service. */ readonly numberOfDatabases: pulumi.Output<number>; /** * When persistence is 'rdb', Valkey 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. */ readonly persistence: pulumi.Output<string>; /** * 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. */ readonly pubsubClientOutputBufferLimit: pulumi.Output<number>; /** * A boolean indicating whether to require SSL to access Valkey. */ readonly ssl: pulumi.Output<boolean>; /** * The Valkey idle connection timeout in seconds. */ readonly timeout: pulumi.Output<number>; /** * Active expire effort. Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. */ readonly valkeyActiveExpireEffort: pulumi.Output<number>; /** * Create a DatabaseValkeyConfig 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: DatabaseValkeyConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DatabaseValkeyConfig resources. */ export interface DatabaseValkeyConfigState { /** * 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 Valkey' `acl-pubsub-default` configuration. Supported values are: `allchannels` and `resetchannels` */ aclChannelsDefault?: pulumi.Input<string>; /** * The ID of the target Valkey cluster. */ clusterId?: pulumi.Input<string>; /** * Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkeyPersistence is set to off. */ frequentSnapshots?: pulumi.Input<boolean>; /** * The Valkey IO thread count. */ ioThreads?: pulumi.Input<number>; /** * The LFU maxmemory policy counter decay time in minutes. */ lfuDecayTime?: pulumi.Input<number>; /** * The counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory policies. */ lfuLogFactor?: pulumi.Input<number>; /** * The `notify-keyspace-events` option. Requires at least `K` or `E`. */ notifyKeyspaceEvents?: pulumi.Input<string>; /** * The number of Valkey databases. Changing this will cause a restart of Valkey service. */ numberOfDatabases?: pulumi.Input<number>; /** * When persistence is 'rdb', Valkey 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. */ persistence?: pulumi.Input<string>; /** * 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. */ pubsubClientOutputBufferLimit?: pulumi.Input<number>; /** * A boolean indicating whether to require SSL to access Valkey. */ ssl?: pulumi.Input<boolean>; /** * The Valkey idle connection timeout in seconds. */ timeout?: pulumi.Input<number>; /** * Active expire effort. Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. */ valkeyActiveExpireEffort?: pulumi.Input<number>; } /** * The set of arguments for constructing a DatabaseValkeyConfig resource. */ export interface DatabaseValkeyConfigArgs { /** * 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 Valkey' `acl-pubsub-default` configuration. Supported values are: `allchannels` and `resetchannels` */ aclChannelsDefault?: pulumi.Input<string>; /** * The ID of the target Valkey cluster. */ clusterId: pulumi.Input<string>; /** * Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkeyPersistence is set to off. */ frequentSnapshots?: pulumi.Input<boolean>; /** * The Valkey IO thread count. */ ioThreads?: pulumi.Input<number>; /** * The LFU maxmemory policy counter decay time in minutes. */ lfuDecayTime?: pulumi.Input<number>; /** * The counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory policies. */ lfuLogFactor?: pulumi.Input<number>; /** * The `notify-keyspace-events` option. Requires at least `K` or `E`. */ notifyKeyspaceEvents?: pulumi.Input<string>; /** * The number of Valkey databases. Changing this will cause a restart of Valkey service. */ numberOfDatabases?: pulumi.Input<number>; /** * When persistence is 'rdb', Valkey 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. */ persistence?: pulumi.Input<string>; /** * 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. */ pubsubClientOutputBufferLimit?: pulumi.Input<number>; /** * A boolean indicating whether to require SSL to access Valkey. */ ssl?: pulumi.Input<boolean>; /** * The Valkey idle connection timeout in seconds. */ timeout?: pulumi.Input<number>; /** * Active expire effort. Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. */ valkeyActiveExpireEffort?: pulumi.Input<number>; }