github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/aws/r/rds_cluster.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_rds_cluster" 4 sidebar_current: "docs-aws-resource-rds-cluster" 5 description: |- 6 Provides an RDS Cluster Resource 7 --- 8 9 # aws\_rds\_cluster 10 11 Provides an RDS Cluster Resource. A Cluster Resource defines attributes that are 12 applied to the entire cluster of [RDS Cluster Instances][3]. Use the RDS Cluster 13 resource and RDS Cluster Instances to create and use Amazon Aurora, a MySQL-compatible 14 database engine. 15 16 For more information on Amazon Aurora, see [Aurora on Amazon RDS][2] in the Amazon RDS User Guide. 17 18 Changes to a RDS Cluster can occur when you manually change a 19 parameter, such as `port`, and are reflected in the next maintenance 20 window. Because of this, Terraform may report a difference in it's planning 21 phase because a modification has not yet taken place. You can use the 22 `apply_immediately` flag to instruct the service to apply the change immediately 23 (see documentation below). 24 25 ~> **Note:** using `apply_immediately` can result in a 26 brief downtime as the server reboots. See the AWS Docs on [RDS Maintenance][4] 27 for more information. 28 29 ## Example Usage 30 31 ``` 32 resource "aws_rds_cluster" "default" { 33 cluster_identifier = "aurora-cluster-demo" 34 availability_zones = ["us-west-2a","us-west-2b","us-west-2c"] 35 database_name = "mydb" 36 master_username = "foo" 37 master_password = "bar" 38 backup_retention_period = 5 39 preferred_backup_window = "07:00-09:00" 40 } 41 ``` 42 43 ~> **NOTE:** RDS Clusters resources that are created without any matching 44 RDS Cluster Instances do not currently display in the AWS Console. 45 46 ## Argument Reference 47 48 For more detailed documentation about each argument, refer to 49 the [AWS official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-ModifyDBInstance.html). 50 51 The following arguments are supported: 52 53 * `cluster_identifier` - (Required) The Cluster Identifier. Must be a lower case 54 string. 55 * `database_name` - (Optional) The name for your database of up to 8 alpha-numeric 56 characters. If you do not provide a name, Amazon RDS will not create a 57 database in the DB cluster you are creating 58 * `master_password` - (Required) Password for the master DB user. Note that this may 59 show up in logs, and it will be stored in the state file 60 * `master_username` - (Required) Username for the master DB user 61 * `final_snapshot_identifier` - (Optional) The name of your final DB snapshot 62 when this DB cluster is deleted. If omitted, no final snapshot will be 63 made. 64 * `availability_zones` - (Optional) A list of EC2 Availability Zones that 65 instances in the DB cluster can be created in 66 * `backup_retention_period` - (Optional) The days to retain backups for. Default 67 1 68 * `preferred_backup_window` - (Optional) The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter. 69 Default: A 30-minute window selected at random from an 8-hour block of time per region. e.g. 04:00-09:00 70 * `preferred_maintenance_window` - (Optional) The weekly time range during which system maintenance can occur, in (UTC) e.g. wed:04:00-wed:04:30 71 * `port` - (Optional) The port on which the DB accepts connections 72 * `vpc_security_group_ids` - (Optional) List of VPC security groups to associate 73 with the Cluster 74 * `storage_encrypted` - (Optional) Specifies whether the DB cluster is encrypted. The default is `false` if not specified. 75 * `apply_immediately` - (Optional) Specifies whether any cluster modifications 76 are applied immediately, or during the next maintenance window. Default is 77 `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) 78 * `db_subnet_group_name` - (Optional) A DB subnet group to associate with this DB instance. **NOTE:** This must match the `db_subnet_group_name` specified on every [`aws_rds_cluster_instance`](/docs/providers/aws/r/rds_cluster_instance.html) in the cluster. 79 80 ## Attributes Reference 81 82 The following attributes are exported: 83 84 * `id` - The RDS Cluster Identifier 85 * `cluster_identifier` - The RDS Cluster Identifier 86 * `cluster_members` – List of RDS Instances that are a part of this cluster 87 * `address` - The address of the RDS instance. 88 * `allocated_storage` - The amount of allocated storage 89 * `availability_zones` - The availability zone of the instance 90 * `backup_retention_period` - The backup retention period 91 * `preferred_backup_window` - The backup window 92 * `preferred_maintenance_window` - The maintenance window 93 * `endpoint` - The primary, writeable connection endpoint 94 * `engine` - The database engine 95 * `engine_version` - The database engine version 96 * `maintenance_window` - The instance maintenance window 97 * `database_name` - The database name 98 * `port` - The database port 99 * `status` - The RDS instance status 100 * `username` - The master username for the database 101 * `storage_encrypted` - Specifies whether the DB cluster is encrypted 102 * `preferred_backup_window` - The daily time range during which the backups happen 103 104 [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Replication.html 105 106 [2]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html 107 [3]: /docs/providers/aws/r/rds_cluster_instance.html 108 [4]: http://docs.aws.amazon.com/fr_fr/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html