Fugue.AWS.RDS.DBCluster.AuroraMySQL

Table of Contents

Module Members

new

(Function)

Create a new AuroraMySQL (MySQL 5.7) DBCluster.

Example:

import Fugue.AWS as AWS
import Fugue.AWS.EC2 as EC2
import Fugue.AWS.Pattern.Network as Network
import Fugue.AWS.RDS as RDS
import Fugue.Core.Vars as Vars

net: Network.new {
  name: "EXAMPLE",
  cidr: "10.42.0.0/16",
  region: AWS.Us-east-1,
  publicSubnets: [
    (AWS.B, "10.42.12.0/24"),
    (AWS.C, "10.42.13.0/24")
  ],
  privateSubnets: [
    (AWS.B, "10.42.22.0/24"),
    (AWS.C, "10.42.23.0/24")
  ]
}

dbSubnetGroup: RDS.DBSubnetGroup.new {
  name: "private",
  description: "private subnets",
  subnets: net.privateSubnets,
}

dbSecurityGroup: EC2.SecurityGroup.new {
  description: "My Database",
  ipPermissions: [
    # add rules here...
  ],
  ipPermissionsEgress: None,
  vpc: net.vpc,
}

dbCluster: RDS.DBCluster.AuroraMySQL.new {
  dbClusterIdentifier: "myCluster",
  dbSubnetGroup: dbSubnetGroup,
  masterUsername: "master",
  masterUserPassword: Vars.PlainText {password: "12345678"},
  securityGroups: [dbSecurityGroup],
}

Type Signature

 fun { backupRetentionPeriod: Optional<Int>,
       databaseName: Optional<String>,
       dbClusterIdentifier: String,
       dbClusterParameterGroup: Optional<DBClusterParameterGroup>,
       dbSubnetGroup: DBSubnetGroup,
       engineVersion: Optional<String>,
       port: Optional<Int>,
       masterUsername: String,
       preferredBackupWindow: Optional<String>,
       preferredMaintenanceWindow: Optional<String>,
       securityGroups: List<SecurityGroup>,
       storageEncrypted: Optional<Bool>,
       enableIAMDatabaseAuthorization: Optional<Bool>,
       kmsKey: Optional<Key>,
       masterUserPassword: Password,
       roles: Optional<List<Role>>,
       tags: Optional<List<Tag>>,
       snapshotIdentifier: Optional<String>,
       finalSnapshotIdentifier: Optional<String> } -> DBCluster
Argument: backupRetentionPeriod

The number of days for which automated backups are retained. You must specify a minimum value of 1. Default 1. Must be a value from 1 to 35. Mutable.

Type: Optional<Int>

Argument: databaseName

The name for your database, composed of up to 64 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.

Type: Optional<String>

Argument: dbClusterIdentifier

The DB cluster identifier. This parameter is stored as a lowercase string. Must contain from 1 to 63 letters, numbers, or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Mutable.

Type: String

Argument: dbClusterParameterGroup

The DB cluster parameter group to associate with this DB cluster. Mutable.

Type: Optional<DBClusterParameterGroup>

Argument: dbSubnetGroup

The DBSubnetGroup to deploy the cluster in.

Type: DBSubnetGroup

Argument: engineVersion
Type: Optional<String>
Argument: port

The port number on which the instances in the DB cluster accept connections. Defaults to 3306. Mutable.

Type: Optional<Int>

Argument: masterUsername

The name of the master user for the DB cluster. Must be 1 to 16 letters or numbers. First character must be a letter. Cannot be a reserved word for the chosen database engine.

Type: String

Argument: preferredBackupWindow

The daily window where backups are performed. Window is specified in UTC using the following format: ‘hh24:mi-hh24:mi’. The provided window must be at least 30 minutes. Defaults to a randomly selected 30 minute window appropriate for the region. Mutable.

Type: Optional<String>

Argument: preferredMaintenanceWindow

The weekly window where maintenance can be performed by AWS. Window is specified in UTC using the following format: ‘ddd:hh24:mi-ddd:hh24:mi’. The provided window must be at least 30 minutes. Defaults to a randomly selected day and 30 minute window appropriate for the region. Mutable.

Type: Optional<String>

Argument: securityGroups

The list of security groups to attach to the instance. This list must not be empty. Mutable.

Type: List<SecurityGroup>

Argument: storageEncrypted

If True the DBInstance‘s will use encrypted storage. Defaults to False.

Type: Optional<Bool>

Argument: enableIAMDatabaseAuthorization

True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false. Only valid for Aurora and AuroraMySQL engines. Mutable.

Type: Optional<Bool>

Argument: kmsKey

The KMS key to use when encrypting DBInstance storage. Defaults to the default KMS key for your account.

Type: Optional<Key>

Argument: masterUserPassword

The password for the master database user. Mutable.

Type: Password

Argument: roles

Associated Identity and Access Management (IAM) roles from an Aurora DB cluster to access other AWS services on your behalf. Mutable.

Type: Optional<List<Role>>

Argument: tags

An optional list of tags to attach to the DB instance. Mutable.

Type: Optional<List<Tag>>

Argument: snapshotIdentifier

The snapshot to provision the DBCluster from.

Type: Optional<String>

Argument: finalSnapshotIdentifier

The name of the final snapshot to create when Fugue deletes the DBCluster. Mutable.

Type: Optional<String>

Returns:

The cluster configuration.

Type: DBCluster