github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/website/source/docs/providers/aws/r/rds_cluster_instance.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_rds_cluster_instance"
     4  sidebar_current: "docs-aws-resource-rds-cluster-instance"
     5  description: |-
     6    Provides an RDS Cluster Resource Instance
     7  ---
     8  
     9  # aws\_rds\_cluster\_instance
    10  
    11  Provides an RDS Cluster Resource Instance. A Cluster Instance Resource defines
    12  attributes that are specific to a single instance in a [RDS Cluster][3],
    13  specifically running Amazon Aurora.
    14  
    15  Unlike other RDS resources that support replication, with Amazon Aurora you do
    16  not designate a primary and subsequent replicas. Instead, you simply add RDS
    17  Instances and Aurora manages the replication. You can use the [count][5]
    18  meta-parameter to make multiple instances and join them all to the same RDS
    19  Cluster, or you may specify different Cluster Instance resources with various
    20  `instance_class` sizes.
    21  
    22  For more information on Amazon Aurora, see [Aurora on Amazon RDS][2] in the Amazon RDS User Guide.
    23  
    24  ## Example Usage
    25  
    26  ```
    27  resource "aws_rds_cluster_instance" "cluster_instances" {
    28    count = 2
    29    identifier = "aurora-cluster-demo"
    30    cluster_identifier = "${aws_rds_cluster.default.id}"
    31    instance_class = "db.r3.large"
    32  }
    33  
    34  resource "aws_rds_cluster" "default" {
    35    cluster_identifier = "aurora-cluster-demo"
    36    availability_zones = ["us-west-2a","us-west-2b","us-west-2c"]
    37    database_name = "mydb"
    38    master_username = "foo"
    39    master_password = "bar"
    40  }
    41  ```
    42  
    43  ## Argument Reference
    44  
    45  For more detailed documentation about each argument, refer to
    46  the [AWS official documentation](http://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-ModifyDBInstance.html).
    47  
    48  The following arguments are supported:
    49  
    50  * `identifier` - (Optional) The Instance Identifier. Must be a lower case
    51  string. If omitted, a unique identifier will be generated.
    52  * `cluster_identifier` - (Required) The Cluster Identifier for this Instance to
    53  join. Must be a lower case
    54  string.
    55  * `instance_class` - (Required) The instance class to use. For details on CPU
    56  and memory, see [Scaling Aurora DB Instances][4]. Aurora currently
    57    supports the below instance classes.
    58    - db.r3.large
    59    - db.r3.xlarge
    60    - db.r3.2xlarge
    61    - db.r3.4xlarge
    62    - db.r3.8xlarge
    63  * `publicly_accessible` - (Optional) Bool to control if instance is publicly accessible.
    64  Default `false`. See the documentation on [Creating DB Instances][6] for more
    65  details on controlling this property.
    66  
    67  * `db_subnet_group_name` - (Optional) A DB subnet group to associate with this DB instance.
    68  
    69  ~> **NOTE:** `db_subnet_group_name` is a required field when you are trying to create a private instance (`publicly_accessible` = false)
    70  
    71  ## Attributes Reference
    72  
    73  The following attributes are exported:
    74  
    75  * `cluster_identifier` - The RDS Cluster Identifier
    76  * `identifier` - The Instance identifier
    77  * `id` - The Instance identifier
    78  * `writer` – Boolean indicating if this instance is writable. `False` indicates
    79  this instance is a read replica
    80  * `allocated_storage` - The amount of allocated storage
    81  * `availability_zones` - The availability zone of the instance
    82  * `endpoint` - The IP address for this instance. May not be writable
    83  * `engine` - The database engine
    84  * `engine_version` - The database engine version
    85  * `database_name` - The database name
    86  * `port` - The database port
    87  * `status` - The RDS instance status
    88  
    89  [2]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html
    90  [3]: /docs/providers/aws/r/rds_cluster.html
    91  [4]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html
    92  [5]: /docs/configuration/resources.html#count
    93  [6]: http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html