github.com/adamar/terraform@v0.2.2-0.20141016210445-2e703afdad0e/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  ---
     6  
     7  # aws\_db\_instance
     8  
     9  Provides an RDS instance resource.
    10  
    11  ## Example Usage
    12  
    13  ```
    14  resource "aws_db_instance" "default" {
    15  	identifier = "mydb-rds"
    16  	allocated_storage = 10
    17  	engine = "mysql"
    18  	engine_version = "5.6.17"
    19  	instance_class = "db.t1.micro"
    20  	name = "mydb"
    21  	username = "foo"
    22  	password = "bar"
    23  	security_group_names = ["${aws_db_security_group.bar.name}"]
    24          subnet_group_name = "my_database_subnet_group"
    25  }
    26  ```
    27  
    28  ## Argument Reference
    29  
    30  The following arguments are supported:
    31  
    32  * `allocated_storage` - (Required) The allocated storage in gigabytes.
    33  * `engine` - (Required) The database engine to use.
    34  * `engine_version` - (Required) The engine version to use.
    35  * `identifier` - (Required) The name of the RDS instance
    36  * `instance_class` - (Required) The instance type of the RDS instance.
    37  * `final_snapshot_identifier` - (Optional) The name of your final DB snapshot.
    38  * `name` - (Required) The DB name to create.
    39  * `password` - (Required) Password for the master DB user. Note that this will be stored
    40      in the state file.
    41  * `username` - (Required) Username for the master DB user.
    42  * `availability_zone` - (Optional) The AZ for the RDS instance.
    43  * `backup_retention_period` - (Optional) The days to retain backups for.
    44  * `backup_window` - (Optional) The backup window.
    45  * `iops` - (Optional) The amount of provisioned IOPS
    46  * `maintenance_window` - (Optional) The window to perform maintenance in.
    47  * `multi_az` - (Optional) Specifies if the RDS instance is multi-AZ
    48  * `port` - (Optional) The port on which the DB accepts connections.
    49  * `publicly_accessible` - (Optional) Bool to control if instance is publicly accessible.
    50  * `vpc_security_group_ids` - (Optional) List of VPC security groups to associate.
    51  * `skip_final_snapshot` - (Optional) Enables skipping the final snapshot on deletion.
    52  * `security_group_names` - (Optional) List of DB Security Groups to associate.
    53  * `subnet_group_name` - (Optional) Name of DB subnet group
    54  
    55  ## Attributes Reference
    56  
    57  The following attributes are exported:
    58  
    59  * `id` - The RDS instance ID.
    60  * `address` - The address of the RDS instance.
    61  * `allocated_storage` - The amount of allocated storage
    62  * `availability_zone` - The availability zone of the instance
    63  * `backup_retention_period` - The backup retention period
    64  * `backup_window` - The backup window
    65  * `endpoint` - The connection endpoint
    66  * `engine` - The database engine
    67  * `engine_version` - The database engine version
    68  * `instance_class`- The RDS instance class
    69  * `maintenance_window` - The instance maintenance window
    70  * `multi_az` - If the RDS instance is multi AZ enabled
    71  * `name` - The database name
    72  * `port` - The database port
    73  * `status` - The RDS instance status
    74  * `username` - The master username for the database
    75