FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_rds_cluster

Provides an RDS Cluster Resource. A Cluster Resource defines attributes that are applied to the entire cluster of RDS Cluster Instances. Use the RDS Cluster resource and RDS Cluster Instances to create and use Amazon Aurora, a MySQL-compatible database engine.

For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.

Changes to a RDS Cluster can occur when you manually change a parameter, such as port, and are reflected in the next maintenance window. Because of this, Terraform may report a difference in its planning phase because a modification has not yet taken place. You can use the apply_immediately flag to instruct the service to apply the change immediately (see documentation below).

~> Note: using apply_immediately can result in a brief downtime as the server reboots. See the AWS Docs on RDS Maintenance for more information.

Example Usage

resource "aws_rds_cluster" "default" {
  cluster_identifier = "aurora-cluster-demo"
  availability_zones = ["us-west-2a","us-west-2b","us-west-2c"]
  database_name = "mydb"
  master_username = "foo"
  master_password = "bar"
  backup_retention_period = 5
  preferred_backup_window = "07:00-09:00"
}

~> NOTE: RDS Clusters resources that are created without any matching RDS Cluster Instances do not currently display in the AWS Console.

Argument Reference

For more detailed documentation about each argument, refer to the AWS official documentation.

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

RDS Clusters can be imported using the cluster_identifier, e.g.

$ terraform import aws_rds_cluster.aurora_cluster aurora-prod-cluster

See the source of this document at Terraform.io