Cluster Instance Args
Provides an RDS Cluster Instance Resource. A Cluster Instance Resource defines attributes that are specific to a single instance in a RDS Cluster, specifically running Amazon Aurora. Unlike other RDS resources that support replication, with Amazon Aurora you do not designate a primary and subsequent replicas. Instead, you simply add RDS Instances and Aurora manages the replication. You can use the 5 meta-parameter to make multiple instances and join them all to the same RDS Cluster, or you may specify different Cluster Instance resources with various instance_class
sizes. For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
NOTE: Deletion Protection from the RDS service can only be enabled at the cluster level, not for individual cluster instances. You can still add the
protect
CustomResourceOption to this resource configuration if you desire protection from accidental deletion.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterInstance;
import com.pulumi.aws.rds.ClusterInstanceArgs;
import com.pulumi.codegen.internal.KeyedValue;
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 default_ = new Cluster("default", ClusterArgs.builder()
.clusterIdentifier("aurora-cluster-demo")
.availabilityZones(
"us-west-2a",
"us-west-2b",
"us-west-2c")
.databaseName("mydb")
.masterUsername("foo")
.masterPassword("barbut8chars")
.build());
for (var i = 0; i < 2; i++) {
new ClusterInstance("clusterInstances-" + i, ClusterInstanceArgs.builder()
.identifier(String.format("aurora-cluster-demo-%s", range.value()))
.clusterIdentifier(default_.id())
.instanceClass("db.r4.large")
.engine(default_.engine())
.engineVersion(default_.engineVersion())
.build());
}
}
}
Import
RDS Cluster Instances can be imported using the identifier
, e.g.,
$ pulumi import aws:rds/clusterInstance:ClusterInstance prod_instance_1 aurora-cluster-instance-1
Constructors
Properties
Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default isfalse
.
Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Default true
.
The EC2 Availability Zone that the DB instance is created in. See docs about the details.
The identifier of the CA certificate for the DB instance.
The identifier of the aws.rds.Cluster
in which to launch this instance.
Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. Default false
.
The name of the DB parameter group to associate with this instance.
A DB subnet group to associate with this DB instance. NOTE: This must match the db_subnet_group_name
of the attached aws.rds.Cluster
.
The name of the database engine to be used for the RDS instance. Defaults to aurora
. Valid Values: aurora
, aurora-mysql
, aurora-postgresql
. For information on the difference between the available Aurora MySQL engines see Comparison between Aurora MySQL 1 and Aurora MySQL 2 in the Amazon RDS User Guide.
The database engine version.
The indentifier for the RDS instance, if omitted, this provider will assign a random, unique identifier.
Creates a unique identifier beginning with the specified prefix. Conflicts with identifier
.
The instance class to use. For details on CPU and memory, see Scaling Aurora DB Instances. Aurora uses db.*
instance classes/types. Please see AWS Documentation for currently available instance classes and complete details.
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60.
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the AWS Documentation what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances.
Specifies whether Performance Insights is enabled or not.
ARN for the KMS key to encrypt Performance Insights data. When specifying performance_insights_kms_key_id
, performance_insights_enabled
needs to be set to true.
Amount of time in days to retain Performance Insights data. Valid values are 7
, 731
(2 years) or a multiple of 31
. When specifying performance_insights_retention_period
, performance_insights_enabled
needs to be set to true. Defaults to '7'.
The daily time range during which automated backups are created if automated backups are enabled. Eg: "04:00-09:00". NOTE: If preferred_backup_window
is set at the cluster level, this argument must be omitted.
The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00".
Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer.
Bool to control if instance is publicly accessible. Default false
. See the documentation on Creating DB Instances for more details on controlling this property.