import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Creates a Database within a specified Active-Active Subscription in your Redis Enterprise Cloud Account. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as rediscloud from "@pulumi/rediscloud"; * import * as rediscloud from "@rediscloud/pulumi-rediscloud"; * * export = async () => { * const card = await rediscloud.getPaymentMethod({ * cardType: "Visa", * }); * const subscription_resource = new rediscloud.ActiveActiveSubscription("subscription-resource", { * paymentMethodId: card.id, * cloudProvider: "AWS", * creationPlan: { * memoryLimitInGb: 1, * quantity: 1, * regions: [ * { * region: "us-east-1", * networkingDeploymentCidr: "192.168.0.0/24", * writeOperationsPerSecond: 1000, * readOperationsPerSecond: 1000, * }, * { * region: "us-east-2", * networkingDeploymentCidr: "10.0.1.0/24", * writeOperationsPerSecond: 1000, * readOperationsPerSecond: 2000, * }, * ], * }, * }); * const database_resource = new rediscloud.ActiveActiveSubscriptionDatabase("database-resource", { * subscriptionId: subscription_resource.id, * memoryLimitInGb: 1, * globalDataPersistence: "aof-every-1-second", * globalPassword: "some-random-pass-2", * globalSourceIps: ["192.168.0.0/16"], * globalAlerts: [{ * name: "dataset-size", * value: 40, * }], * overrideRegions: [ * { * name: "us-east-2", * overrideGlobalSourceIps: ["192.10.0.0/16"], * }, * { * name: "us-east-1", * overrideGlobalDataPersistence: "none", * overrideGlobalPassword: "region-specific-password", * overrideGlobalAlerts: [{ * name: "dataset-size", * value: 60, * }], * }, * ], * }); * return { * "us-east-1-public-endpoints": database_resource.publicEndpoint["us-east-1"], * "us-east-2-private-endpoints": database_resource.privateEndpoint["us-east-1"], * }; * } * ``` * * ## Import * * `rediscloud_active_active_subscription_database` can be imported using the ID of the Active-Active subscription and the ID of the database in the format {subscription ID}/{database ID}, e.g. * * ```sh * $ pulumi import rediscloud:index/activeActiveSubscriptionDatabase:ActiveActiveSubscriptionDatabase database-resource 123456/12345678 * ``` * NoteDue to constraints in the Redis Cloud API, the import process will not import global attributes or override region attributes. If you wish to use these attributes in your Terraform configuration, you will need to manually add them to your Terraform configuration and run `pulumi up` to update the database. */ export declare class ActiveActiveSubscriptionDatabase extends pulumi.CustomResource { /** * Get an existing ActiveActiveSubscriptionDatabase 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, state?: ActiveActiveSubscriptionDatabaseState, opts?: pulumi.CustomResourceOptions): ActiveActiveSubscriptionDatabase; /** * Returns true if the given object is an instance of ActiveActiveSubscriptionDatabase. 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 ActiveActiveSubscriptionDatabase; /** * SSL certificate to authenticate user connections. */ readonly clientSslCertificate: pulumi.Output; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'. Default: 'volatile-lru') */ readonly dataEviction: pulumi.Output; /** * Identifier of the database created */ readonly dbId: pulumi.Output; /** * Use TLS for authentication. Default: ‘false’ */ readonly enableTls: pulumi.Output; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ readonly externalEndpointForOssClusterApi: pulumi.Output; /** * A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times. (either: 'dataset-size', 'datasets-size', 'throughput-higher-than', 'throughput-lower-than', 'latency', 'syncsource-error', 'syncsource-lag' or 'connections-limit') */ readonly globalAlerts: pulumi.Output; /** * Global rate of database data persistence (in persistent storage) of regions that dont override global settings. Default: 'none' */ readonly globalDataPersistence: pulumi.Output; /** * Password to access the database of regions that don't override global settings. If left empty, the password will be generated automatically */ readonly globalPassword: pulumi.Output; /** * List of source IP addresses or subnet masks of regions that don't override global settings. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24']) */ readonly globalSourceIps: pulumi.Output; /** * Maximum memory usage for this specific database, including replication and other overhead */ readonly memoryLimitInGb: pulumi.Output; /** * A meaningful name to identify the database. **Modifying this attribute will force creation of a new resource.** */ readonly name: pulumi.Output; /** * Override region specific configuration, documented below */ readonly overrideRegions: pulumi.Output; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ readonly port: pulumi.Output; /** * A map of which private endpoints can to access the database per region, uses region name as key. */ readonly privateEndpoint: pulumi.Output<{ [key: string]: string; }>; /** * A map of which public endpoints can to access the database per region, uses region name as key. */ readonly publicEndpoint: pulumi.Output<{ [key: string]: string; }>; /** * The ID of the Active-Active subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ readonly subscriptionId: pulumi.Output; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ readonly supportOssClusterApi: pulumi.Output; /** * Create a ActiveActiveSubscriptionDatabase 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: ActiveActiveSubscriptionDatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActiveActiveSubscriptionDatabase resources. */ export interface ActiveActiveSubscriptionDatabaseState { /** * SSL certificate to authenticate user connections. */ clientSslCertificate?: pulumi.Input; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'. Default: 'volatile-lru') */ dataEviction?: pulumi.Input; /** * Identifier of the database created */ dbId?: pulumi.Input; /** * Use TLS for authentication. Default: ‘false’ */ enableTls?: pulumi.Input; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ externalEndpointForOssClusterApi?: pulumi.Input; /** * A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times. (either: 'dataset-size', 'datasets-size', 'throughput-higher-than', 'throughput-lower-than', 'latency', 'syncsource-error', 'syncsource-lag' or 'connections-limit') */ globalAlerts?: pulumi.Input[]>; /** * Global rate of database data persistence (in persistent storage) of regions that dont override global settings. Default: 'none' */ globalDataPersistence?: pulumi.Input; /** * Password to access the database of regions that don't override global settings. If left empty, the password will be generated automatically */ globalPassword?: pulumi.Input; /** * List of source IP addresses or subnet masks of regions that don't override global settings. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24']) */ globalSourceIps?: pulumi.Input[]>; /** * Maximum memory usage for this specific database, including replication and other overhead */ memoryLimitInGb?: pulumi.Input; /** * A meaningful name to identify the database. **Modifying this attribute will force creation of a new resource.** */ name?: pulumi.Input; /** * Override region specific configuration, documented below */ overrideRegions?: pulumi.Input[]>; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ port?: pulumi.Input; /** * A map of which private endpoints can to access the database per region, uses region name as key. */ privateEndpoint?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A map of which public endpoints can to access the database per region, uses region name as key. */ publicEndpoint?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the Active-Active subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ subscriptionId?: pulumi.Input; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ supportOssClusterApi?: pulumi.Input; } /** * The set of arguments for constructing a ActiveActiveSubscriptionDatabase resource. */ export interface ActiveActiveSubscriptionDatabaseArgs { /** * SSL certificate to authenticate user connections. */ clientSslCertificate?: pulumi.Input; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'. Default: 'volatile-lru') */ dataEviction?: pulumi.Input; /** * Use TLS for authentication. Default: ‘false’ */ enableTls?: pulumi.Input; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ externalEndpointForOssClusterApi?: pulumi.Input; /** * A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times. (either: 'dataset-size', 'datasets-size', 'throughput-higher-than', 'throughput-lower-than', 'latency', 'syncsource-error', 'syncsource-lag' or 'connections-limit') */ globalAlerts?: pulumi.Input[]>; /** * Global rate of database data persistence (in persistent storage) of regions that dont override global settings. Default: 'none' */ globalDataPersistence?: pulumi.Input; /** * Password to access the database of regions that don't override global settings. If left empty, the password will be generated automatically */ globalPassword?: pulumi.Input; /** * List of source IP addresses or subnet masks of regions that don't override global settings. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32', '192.168.12.0/24']) */ globalSourceIps?: pulumi.Input[]>; /** * Maximum memory usage for this specific database, including replication and other overhead */ memoryLimitInGb: pulumi.Input; /** * A meaningful name to identify the database. **Modifying this attribute will force creation of a new resource.** */ name?: pulumi.Input; /** * Override region specific configuration, documented below */ overrideRegions?: pulumi.Input[]>; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ port?: pulumi.Input; /** * The ID of the Active-Active subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ subscriptionId: pulumi.Input; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ supportOssClusterApi?: pulumi.Input; }