github.com/rmenn/terraform@v0.3.8-0.20150225065417-fc84b3a78802/website/source/docs/providers/aws/r/db_instance.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_db_instance"
     4  sidebar_current: "docs-aws-resource-db-instance"
     5  description: |-
     6    Provides an RDS instance resource.
     7  ---
     8  
     9  # aws\_db\_instance
    10  
    11  Provides an RDS instance resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_db_instance" "default" {
    17  	identifier = "mydb-rds"
    18  	allocated_storage = 10
    19  	engine = "mysql"
    20  	engine_version = "5.6.17"
    21  	instance_class = "db.t1.micro"
    22  	name = "mydb"
    23  	username = "foo"
    24  	password = "bar"
    25  	security_group_names = ["${aws_db_security_group.bar.name}"]
    26  	db_subnet_group_name = "my_database_subnet_group"
    27  	parameter_group_name = "default.mysql5.6"
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `allocated_storage` - (Required) The allocated storage in gigabytes.
    36  * `engine` - (Required) The database engine to use.
    37  * `engine_version` - (Required) The engine version to use.
    38  * `identifier` - (Required) The name of the RDS instance
    39  * `instance_class` - (Required) The instance type of the RDS instance.
    40  * `storage_type` - (Optional) One of "standard" (magnetic), "gp2" (general
    41  	purpose SSD), or "io1" (provisioned IOPS SSD). The default is "io1" if
    42  	`iops` is specified, "standard" if not.
    43  * `final_snapshot_identifier` - (Optional) The name of your final DB snapshot
    44      when this DB instance is deleted. If omitted, no final snapshot will be
    45      made.
    46  * `name` - (Optional) The DB name to create. If omitted, no database is created
    47      initially.
    48  * `password` - (Required) Password for the master DB user. Note that this may
    49      show up in logs, and it will be stored in the state file.
    50  * `username` - (Required) Username for the master DB user.
    51  * `availability_zone` - (Optional) The AZ for the RDS instance.
    52  * `backup_retention_period` - (Optional) The days to retain backups for.
    53  * `backup_window` - (Optional) The backup window.
    54  * `iops` - (Optional) The amount of provisioned IOPS. Setting this implies a
    55      storage_type of "io1".
    56  * `maintenance_window` - (Optional) The window to perform maintenance in.
    57  * `multi_az` - (Optional) Specifies if the RDS instance is multi-AZ
    58  * `port` - (Optional) The port on which the DB accepts connections.
    59  * `publicly_accessible` - (Optional) Bool to control if instance is publicly accessible.
    60  * `vpc_security_group_ids` - (Optional) List of VPC security groups to associate.
    61  * `security_group_names` - (Optional) List of DB Security Groups to associate.
    62  * `db_subnet_group_name` - (Optional) Name of DB subnet group
    63  * `parameter_group_name` - (Optional) Name of the DB parameter group to associate.
    64  
    65  ## Attributes Reference
    66  
    67  The following attributes are exported:
    68  
    69  * `id` - The RDS instance ID.
    70  * `address` - The address of the RDS instance.
    71  * `allocated_storage` - The amount of allocated storage
    72  * `availability_zone` - The availability zone of the instance
    73  * `backup_retention_period` - The backup retention period
    74  * `backup_window` - The backup window
    75  * `endpoint` - The connection endpoint
    76  * `engine` - The database engine
    77  * `engine_version` - The database engine version
    78  * `instance_class`- The RDS instance class
    79  * `maintenance_window` - The instance maintenance window
    80  * `multi_az` - If the RDS instance is multi AZ enabled
    81  * `name` - The database name
    82  * `port` - The database port
    83  * `status` - The RDS instance status
    84  * `username` - The master username for the database
    85