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. NOTE:aurora
is no longer a validengine
because of Amazon Aurora's MySQL-Compatible Edition version 1 end of life.
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
Using pulumi import
, import RDS Cluster Instances using the identifier
. For example:
$ pulumi import aws:rds/clusterInstance:ClusterInstance prod_instance_1 aurora-cluster-instance-1
Constructors
Functions
Properties
EC2 Availability Zone that the DB instance is created in. See docs about the details.
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.
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.
Bool to control if instance is publicly accessible. Default false
. See the documentation on Creating DB Instances for more details on controlling this property.