ClusterEndpoint

class ClusterEndpoint : KotlinCustomResource

Manages an RDS Aurora Cluster Endpoint. You can refer to the User Guide.

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.aws.rds.ClusterEndpoint;
import com.pulumi.aws.rds.ClusterEndpointArgs;
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("bar")
.backupRetentionPeriod(5)
.preferredBackupWindow("07:00-09:00")
.build());
var test1 = new ClusterInstance("test1", ClusterInstanceArgs.builder()
.applyImmediately(true)
.clusterIdentifier(default_.id())
.identifier("test1")
.instanceClass("db.t2.small")
.engine(default_.engine())
.engineVersion(default_.engineVersion())
.build());
var test2 = new ClusterInstance("test2", ClusterInstanceArgs.builder()
.applyImmediately(true)
.clusterIdentifier(default_.id())
.identifier("test2")
.instanceClass("db.t2.small")
.engine(default_.engine())
.engineVersion(default_.engineVersion())
.build());
var test3 = new ClusterInstance("test3", ClusterInstanceArgs.builder()
.applyImmediately(true)
.clusterIdentifier(default_.id())
.identifier("test3")
.instanceClass("db.t2.small")
.engine(default_.engine())
.engineVersion(default_.engineVersion())
.build());
var eligible = new ClusterEndpoint("eligible", ClusterEndpointArgs.builder()
.clusterIdentifier(default_.id())
.clusterEndpointIdentifier("reader")
.customEndpointType("READER")
.excludedMembers(
test1.id(),
test2.id())
.build());
var static_ = new ClusterEndpoint("static", ClusterEndpointArgs.builder()
.clusterIdentifier(default_.id())
.clusterEndpointIdentifier("static")
.customEndpointType("READER")
.staticMembers(
test1.id(),
test3.id())
.build());
}
}

Import

RDS Clusters Endpoint can be imported using the cluster_endpoint_identifier, e.g.,

$ pulumi import aws:rds/clusterEndpoint:ClusterEndpoint custom_reader aurora-prod-cluster-custom-reader

1https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.Endpoints.html#Aurora.Endpoints.Cluster

Properties

Link copied to clipboard
val arn: Output<String>

Amazon Resource Name (ARN) of cluster

Link copied to clipboard

The identifier to use for the new endpoint. This parameter is stored as a lowercase string.

Link copied to clipboard

The cluster identifier.

Link copied to clipboard

The type of the endpoint. One of: READER , ANY .

Link copied to clipboard
val endpoint: Output<String>

A custom endpoint for the Aurora cluster

Link copied to clipboard
val excludedMembers: Output<List<String>>?

List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty. Conflicts with static_members.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val staticMembers: Output<List<String>>?

List of DB instance identifiers that are part of the custom endpoint group. Conflicts with excluded_members.

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

Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>