Class ClusterInstance
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 count
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
protectCustomResourceOption to this resource configuration if you desire protection from accidental deletion.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = new Aws.Rds.Cluster("default", new Aws.Rds.ClusterArgs
{
AvailabilityZones =
{
"us-west-2a",
"us-west-2b",
"us-west-2c",
},
ClusterIdentifier = "aurora-cluster-demo",
DatabaseName = "mydb",
MasterPassword = "barbut8chars",
MasterUsername = "foo",
});
var clusterInstances = new List<Aws.Rds.ClusterInstance>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
clusterInstances.Add(new Aws.Rds.ClusterInstance($"clusterInstances-{range.Value}", new Aws.Rds.ClusterInstanceArgs
{
ClusterIdentifier = @default.Id,
Identifier = $"aurora-cluster-demo-{range.Value}",
InstanceClass = "db.r4.large",
}));
}
}
}
Inherited Members
Namespace: Pulumi.Aws.Rds
Assembly: Pulumi.Aws.dll
Syntax
public class ClusterInstance : CustomResource
Constructors
View SourceClusterInstance(String, ClusterInstanceArgs, CustomResourceOptions)
Create a ClusterInstance resource with the given unique name, arguments, and options.
Declaration
public ClusterInstance(string name, ClusterInstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ClusterInstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApplyImmediately
Specifies whether any database modifications
are applied immediately, or during the next maintenance window. Default isfalse.
Declaration
public Output<bool> ApplyImmediately { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Arn
Amazon Resource Name (ARN) of cluster instance
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AutoMinorVersionUpgrade
Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Default true.
Declaration
public Output<bool?> AutoMinorVersionUpgrade { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
AvailabilityZone
The EC2 Availability Zone that the DB instance is created in. See docs about the details.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CaCertIdentifier
The identifier of the CA certificate for the DB instance.
Declaration
public Output<string> CaCertIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClusterIdentifier
The identifier of the aws.rds.Cluster in which to launch this instance.
Declaration
public Output<string> ClusterIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CopyTagsToSnapshot
Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. Default false.
Declaration
public Output<bool?> CopyTagsToSnapshot { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DbiResourceId
The region-unique, immutable identifier for the DB instance.
Declaration
public Output<string> DbiResourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbParameterGroupName
The name of the DB parameter group to associate with this instance.
Declaration
public Output<string> DbParameterGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbSubnetGroupName
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.
Declaration
public Output<string> DbSubnetGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Endpoint
The DNS address for this instance. May not be writable
Declaration
public Output<string> Endpoint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Engine
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.
Declaration
public Output<string> Engine { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EngineVersion
The database engine version.
Declaration
public Output<string> EngineVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Identifier
The indentifier for the RDS instance, if omitted, this provider will assign a random, unique identifier.
Declaration
public Output<string> Identifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IdentifierPrefix
Creates a unique identifier beginning with the specified prefix. Conflicts with identifier.
Declaration
public Output<string> IdentifierPrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceClass
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.
Declaration
public Output<string> InstanceClass { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KmsKeyId
The ARN for the KMS encryption key if one is set to the cluster.
Declaration
public Output<string> KmsKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MonitoringInterval
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.
Declaration
public Output<int?> MonitoringInterval { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
MonitoringRoleArn
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.
Declaration
public Output<string> MonitoringRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PerformanceInsightsEnabled
Specifies whether Performance Insights is enabled or not.
Declaration
public Output<bool> PerformanceInsightsEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
PerformanceInsightsKmsKeyId
The 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.
Declaration
public Output<string> PerformanceInsightsKmsKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
The database port
Declaration
public Output<int> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
PreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled. Eg: "04:00-09:00"
Declaration
public Output<string> PreferredBackupWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PreferredMaintenanceWindow
The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00".
Declaration
public Output<string> PreferredMaintenanceWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PromotionTier
Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer.
Declaration
public Output<int?> PromotionTier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PubliclyAccessible
Bool to control if instance is publicly accessible.
Default false. See the documentation on Creating DB Instances for more
details on controlling this property.
Declaration
public Output<bool?> PubliclyAccessible { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
StorageEncrypted
Specifies whether the DB cluster is encrypted.
Declaration
public Output<bool> StorageEncrypted { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Tags
A map of tags to assign to the instance.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Writer
Boolean indicating if this instance is writable. False indicates this instance is a read replica.
Declaration
public Output<bool> Writer { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, ClusterInstanceState, CustomResourceOptions)
Get an existing ClusterInstance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ClusterInstance Get(string name, Input<string> id, ClusterInstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ClusterInstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ClusterInstance |