ClusterEndpoint

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

Example Usage

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",
            },
            BackupRetentionPeriod = 5,
            ClusterIdentifier = "aurora-cluster-demo",
            DatabaseName = "mydb",
            MasterPassword = "bar",
            MasterUsername = "foo",
            PreferredBackupWindow = "07:00-09:00",
        });
        var test1 = new Aws.Rds.ClusterInstance("test1", new Aws.Rds.ClusterInstanceArgs
        {
            ApplyImmediately = true,
            ClusterIdentifier = @default.Id,
            Identifier = "test1",
            InstanceClass = "db.t2.small",
        });
        var test2 = new Aws.Rds.ClusterInstance("test2", new Aws.Rds.ClusterInstanceArgs
        {
            ApplyImmediately = true,
            ClusterIdentifier = @default.Id,
            Identifier = "test2",
            InstanceClass = "db.t2.small",
        });
        var test3 = new Aws.Rds.ClusterInstance("test3", new Aws.Rds.ClusterInstanceArgs
        {
            ApplyImmediately = true,
            ClusterIdentifier = @default.Id,
            Identifier = "test3",
            InstanceClass = "db.t2.small",
        });
        var eligible = new Aws.Rds.ClusterEndpoint("eligible", new Aws.Rds.ClusterEndpointArgs
        {
            ClusterEndpointIdentifier = "reader",
            ClusterIdentifier = @default.Id,
            CustomEndpointType = "READER",
            ExcludedMembers = 
            {
                test1.Id,
                test2.Id,
            },
        });
        var @static = new Aws.Rds.ClusterEndpoint("static", new Aws.Rds.ClusterEndpointArgs
        {
            ClusterEndpointIdentifier = "static",
            ClusterIdentifier = @default.Id,
            CustomEndpointType = "READER",
            StaticMembers = 
            {
                test1.Id,
                test3.Id,
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/rds"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rds.NewCluster(ctx, "_default", &rds.ClusterArgs{
            AvailabilityZones: pulumi.StringArray{
                pulumi.String("us-west-2a"),
                pulumi.String("us-west-2b"),
                pulumi.String("us-west-2c"),
            },
            BackupRetentionPeriod: pulumi.Int(5),
            ClusterIdentifier:     pulumi.String("aurora-cluster-demo"),
            DatabaseName:          pulumi.String("mydb"),
            MasterPassword:        pulumi.String("bar"),
            MasterUsername:        pulumi.String("foo"),
            PreferredBackupWindow: pulumi.String("07:00-09:00"),
        })
        if err != nil {
            return err
        }
        test1, err := rds.NewClusterInstance(ctx, "test1", &rds.ClusterInstanceArgs{
            ApplyImmediately:  pulumi.Bool(true),
            ClusterIdentifier: _default.ID(),
            Identifier:        pulumi.String("test1"),
            InstanceClass:     pulumi.String("db.t2.small"),
        })
        if err != nil {
            return err
        }
        test2, err := rds.NewClusterInstance(ctx, "test2", &rds.ClusterInstanceArgs{
            ApplyImmediately:  pulumi.Bool(true),
            ClusterIdentifier: _default.ID(),
            Identifier:        pulumi.String("test2"),
            InstanceClass:     pulumi.String("db.t2.small"),
        })
        if err != nil {
            return err
        }
        test3, err := rds.NewClusterInstance(ctx, "test3", &rds.ClusterInstanceArgs{
            ApplyImmediately:  pulumi.Bool(true),
            ClusterIdentifier: _default.ID(),
            Identifier:        pulumi.String("test3"),
            InstanceClass:     pulumi.String("db.t2.small"),
        })
        if err != nil {
            return err
        }
        _, err = rds.NewClusterEndpoint(ctx, "eligible", &rds.ClusterEndpointArgs{
            ClusterEndpointIdentifier: pulumi.String("reader"),
            ClusterIdentifier:         _default.ID(),
            CustomEndpointType:        pulumi.String("READER"),
            ExcludedMembers: pulumi.StringArray{
                test1.ID(),
                test2.ID(),
            },
        })
        if err != nil {
            return err
        }
        _, err = rds.NewClusterEndpoint(ctx, "static", &rds.ClusterEndpointArgs{
            ClusterEndpointIdentifier: pulumi.String("static"),
            ClusterIdentifier:         _default.ID(),
            CustomEndpointType:        pulumi.String("READER"),
            StaticMembers: pulumi.StringArray{
                test1.ID(),
                test3.ID(),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

default = aws.rds.Cluster("default",
    availability_zones=[
        "us-west-2a",
        "us-west-2b",
        "us-west-2c",
    ],
    backup_retention_period=5,
    cluster_identifier="aurora-cluster-demo",
    database_name="mydb",
    master_password="bar",
    master_username="foo",
    preferred_backup_window="07:00-09:00")
test1 = aws.rds.ClusterInstance("test1",
    apply_immediately=True,
    cluster_identifier=default.id,
    identifier="test1",
    instance_class="db.t2.small")
test2 = aws.rds.ClusterInstance("test2",
    apply_immediately=True,
    cluster_identifier=default.id,
    identifier="test2",
    instance_class="db.t2.small")
test3 = aws.rds.ClusterInstance("test3",
    apply_immediately=True,
    cluster_identifier=default.id,
    identifier="test3",
    instance_class="db.t2.small")
eligible = aws.rds.ClusterEndpoint("eligible",
    cluster_endpoint_identifier="reader",
    cluster_identifier=default.id,
    custom_endpoint_type="READER",
    excluded_members=[
        test1.id,
        test2.id,
    ])
static = aws.rds.ClusterEndpoint("static",
    cluster_endpoint_identifier="static",
    cluster_identifier=default.id,
    custom_endpoint_type="READER",
    static_members=[
        test1.id,
        test3.id,
    ])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultCluster = new aws.rds.Cluster("default", {
    availabilityZones: [
        "us-west-2a",
        "us-west-2b",
        "us-west-2c",
    ],
    backupRetentionPeriod: 5,
    clusterIdentifier: "aurora-cluster-demo",
    databaseName: "mydb",
    masterPassword: "bar",
    masterUsername: "foo",
    preferredBackupWindow: "07:00-09:00",
});
const test1 = new aws.rds.ClusterInstance("test1", {
    applyImmediately: true,
    clusterIdentifier: defaultCluster.id,
    identifier: "test1",
    instanceClass: "db.t2.small",
});
const test2 = new aws.rds.ClusterInstance("test2", {
    applyImmediately: true,
    clusterIdentifier: defaultCluster.id,
    identifier: "test2",
    instanceClass: "db.t2.small",
});
const test3 = new aws.rds.ClusterInstance("test3", {
    applyImmediately: true,
    clusterIdentifier: defaultCluster.id,
    identifier: "test3",
    instanceClass: "db.t2.small",
});
const eligible = new aws.rds.ClusterEndpoint("eligible", {
    clusterEndpointIdentifier: "reader",
    clusterIdentifier: defaultCluster.id,
    customEndpointType: "READER",
    excludedMembers: [
        test1.id,
        test2.id,
    ],
});
const static = new aws.rds.ClusterEndpoint("static", {
    clusterEndpointIdentifier: "static",
    clusterIdentifier: defaultCluster.id,
    customEndpointType: "READER",
    staticMembers: [
        test1.id,
        test3.id,
    ],
});

Create a ClusterEndpoint Resource

def ClusterEndpoint(resource_name, opts=None, cluster_endpoint_identifier=None, cluster_identifier=None, custom_endpoint_type=None, excluded_members=None, static_members=None, tags=None, __props__=None);
name string
The unique name of the resource.
args ClusterEndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClusterEndpointArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterEndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ClusterEndpoint Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ClusterEndpoint resource accepts the following input properties:

ClusterEndpointIdentifier string

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

ClusterIdentifier string

The cluster identifier.

CustomEndpointType string

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

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

StaticMembers List<string>

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

Tags Dictionary<string, string>

Key-value map of resource tags

ClusterEndpointIdentifier string

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

ClusterIdentifier string

The cluster identifier.

CustomEndpointType string

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

ExcludedMembers []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.

StaticMembers []string

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

Tags map[string]string

Key-value map of resource tags

clusterEndpointIdentifier string

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

clusterIdentifier string

The cluster identifier.

customEndpointType string

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

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

staticMembers string[]

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

tags {[key: string]: string}

Key-value map of resource tags

cluster_endpoint_identifier str

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

cluster_identifier str

The cluster identifier.

custom_endpoint_type str

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

excluded_members List[str]

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.

static_members List[str]

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

tags Dict[str, str]

Key-value map of resource tags

Outputs

All input properties are implicitly available as output properties. Additionally, the ClusterEndpoint resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of cluster

Endpoint string

A custom endpoint for the Aurora cluster

Id string
The provider-assigned unique ID for this managed resource.
Arn string

Amazon Resource Name (ARN) of cluster

Endpoint string

A custom endpoint for the Aurora cluster

Id string
The provider-assigned unique ID for this managed resource.
arn string

Amazon Resource Name (ARN) of cluster

endpoint string

A custom endpoint for the Aurora cluster

id string
The provider-assigned unique ID for this managed resource.
arn str

Amazon Resource Name (ARN) of cluster

endpoint str

A custom endpoint for the Aurora cluster

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ClusterEndpoint Resource

Get an existing ClusterEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ClusterEndpointState, opts?: CustomResourceOptions): ClusterEndpoint
static get(resource_name, id, opts=None, arn=None, cluster_endpoint_identifier=None, cluster_identifier=None, custom_endpoint_type=None, endpoint=None, excluded_members=None, static_members=None, tags=None, __props__=None);
func GetClusterEndpoint(ctx *Context, name string, id IDInput, state *ClusterEndpointState, opts ...ResourceOption) (*ClusterEndpoint, error)
public static ClusterEndpoint Get(string name, Input<string> id, ClusterEndpointState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

Amazon Resource Name (ARN) of cluster

ClusterEndpointIdentifier string

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

ClusterIdentifier string

The cluster identifier.

CustomEndpointType string

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

Endpoint string

A custom endpoint for the Aurora cluster

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

StaticMembers List<string>

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

Tags Dictionary<string, string>

Key-value map of resource tags

Arn string

Amazon Resource Name (ARN) of cluster

ClusterEndpointIdentifier string

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

ClusterIdentifier string

The cluster identifier.

CustomEndpointType string

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

Endpoint string

A custom endpoint for the Aurora cluster

ExcludedMembers []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.

StaticMembers []string

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

Tags map[string]string

Key-value map of resource tags

arn string

Amazon Resource Name (ARN) of cluster

clusterEndpointIdentifier string

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

clusterIdentifier string

The cluster identifier.

customEndpointType string

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

endpoint string

A custom endpoint for the Aurora cluster

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

staticMembers string[]

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

tags {[key: string]: string}

Key-value map of resource tags

arn str

Amazon Resource Name (ARN) of cluster

cluster_endpoint_identifier str

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

cluster_identifier str

The cluster identifier.

custom_endpoint_type str

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

endpoint str

A custom endpoint for the Aurora cluster

excluded_members List[str]

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.

static_members List[str]

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

tags Dict[str, str]

Key-value map of resource tags

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.