Cluster Endpoint Args
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
The identifier to use for the new endpoint. This parameter is stored as a lowercase string.
The cluster identifier.
The type of the endpoint. One of: READER , ANY .
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
.
List of DB instance identifiers that are part of the custom endpoint group. Conflicts with excluded_members
.