ClusterInstanceArgs

data class ClusterInstanceArgs(val applyImmediately: Output<Boolean>? = null, val autoMinorVersionUpgrade: Output<Boolean>? = null, val availabilityZone: Output<String>? = null, val caCertIdentifier: Output<String>? = null, val clusterIdentifier: Output<String>? = null, val copyTagsToSnapshot: Output<Boolean>? = null, val dbParameterGroupName: Output<String>? = null, val dbSubnetGroupName: Output<String>? = null, val engine: Output<String>? = null, val engineVersion: Output<String>? = null, val identifier: Output<String>? = null, val identifierPrefix: Output<String>? = null, val instanceClass: Output<Either<String, InstanceType>>? = null, val monitoringInterval: Output<Int>? = null, val monitoringRoleArn: Output<String>? = null, val performanceInsightsEnabled: Output<Boolean>? = null, val performanceInsightsKmsKeyId: Output<String>? = null, val performanceInsightsRetentionPeriod: Output<Int>? = null, val preferredBackupWindow: Output<String>? = null, val preferredMaintenanceWindow: Output<String>? = null, val promotionTier: Output<Int>? = null, val publiclyAccessible: Output<Boolean>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ClusterInstanceArgs>

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

Link copied to clipboard
constructor(applyImmediately: Output<Boolean>? = null, autoMinorVersionUpgrade: Output<Boolean>? = null, availabilityZone: Output<String>? = null, caCertIdentifier: Output<String>? = null, clusterIdentifier: Output<String>? = null, copyTagsToSnapshot: Output<Boolean>? = null, dbParameterGroupName: Output<String>? = null, dbSubnetGroupName: Output<String>? = null, engine: Output<String>? = null, engineVersion: Output<String>? = null, identifier: Output<String>? = null, identifierPrefix: Output<String>? = null, instanceClass: Output<Either<String, InstanceType>>? = null, monitoringInterval: Output<Int>? = null, monitoringRoleArn: Output<String>? = null, performanceInsightsEnabled: Output<Boolean>? = null, performanceInsightsKmsKeyId: Output<String>? = null, performanceInsightsRetentionPeriod: Output<Int>? = null, preferredBackupWindow: Output<String>? = null, preferredMaintenanceWindow: Output<String>? = null, promotionTier: Output<Int>? = null, publiclyAccessible: Output<Boolean>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val applyImmediately: Output<Boolean>? = null

Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default isfalse.

Link copied to clipboard
val autoMinorVersionUpgrade: Output<Boolean>? = null

Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Default true.

Link copied to clipboard
val availabilityZone: Output<String>? = null

The EC2 Availability Zone that the DB instance is created in. See docs about the details.

Link copied to clipboard
val caCertIdentifier: Output<String>? = null

The identifier of the CA certificate for the DB instance.

Link copied to clipboard
val clusterIdentifier: Output<String>? = null

The identifier of the aws.rds.Cluster in which to launch this instance.

Link copied to clipboard
val copyTagsToSnapshot: Output<Boolean>? = null

Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. Default false.

Link copied to clipboard
val dbParameterGroupName: Output<String>? = null

The name of the DB parameter group to associate with this instance.

Link copied to clipboard
val dbSubnetGroupName: Output<String>? = null

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.

Link copied to clipboard
val engine: Output<String>? = null

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.

Link copied to clipboard
val engineVersion: Output<String>? = null

The database engine version.

Link copied to clipboard
val identifier: Output<String>? = null

The indentifier for the RDS instance, if omitted, this provider will assign a random, unique identifier.

Link copied to clipboard
val identifierPrefix: Output<String>? = null

Creates a unique identifier beginning with the specified prefix. Conflicts with identifier.

Link copied to clipboard
val instanceClass: Output<Either<String, InstanceType>>? = null

The instance class to use. For details on CPU and memory, see Scaling Aurora DB Instances. Aurora uses db&#46;* instance classes/types. Please see AWS Documentation for currently available instance classes and complete details.

Link copied to clipboard
val monitoringInterval: Output<Int>? = null

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.

Link copied to clipboard
val monitoringRoleArn: Output<String>? = null

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.

Link copied to clipboard
val performanceInsightsEnabled: Output<Boolean>? = null

Specifies whether Performance Insights is enabled or not.

Link copied to clipboard
val performanceInsightsKmsKeyId: Output<String>? = null

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.

Link copied to clipboard

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'.

Link copied to clipboard
val preferredBackupWindow: Output<String>? = null

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.

Link copied to clipboard
val preferredMaintenanceWindow: Output<String>? = null

The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00".

Link copied to clipboard
val promotionTier: Output<Int>? = null

Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer.

Link copied to clipboard
val publiclyAccessible: Output<Boolean>? = null

Bool to control if instance is publicly accessible. Default false. See the documentation on Creating DB Instances for more details on controlling this property.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the instance. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ClusterInstanceArgs