github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/aws/d/db_snapshot.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_db_snapshot"
     4  sidebar_current: "docs-aws-datasource-db-snapshot"
     5  description: |-
     6    Get information on a DB Snapshot.
     7  ---
     8  
     9  # aws\_db\_snapshot
    10  
    11  Use this data source to get information about a DB Snapshot for use when provisioning DB instances
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_db_instance" "default" {
    17    allocated_storage    = 10
    18    engine               = "mysql"
    19    engine_version       = "5.6.17"
    20    instance_class       = "db.t1.micro"
    21    name                 = "mydb"
    22    username             = "foo"
    23    password             = "bar"
    24    db_subnet_group_name = "my_database_subnet_group"
    25    parameter_group_name = "default.mysql5.6"
    26  }
    27  
    28  data "aws_db_snapshot" "db_snapshot" {
    29      most_recent = true
    30      owners = ["self"]
    31      db_instance_identifier = "${aws_db_instance.default.identifier}"
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `most_recent` - (Optional) If more than one result is returned, use the most
    40  recent Snapshot.
    41  
    42  * `db_instance_identifier` - (Optional) Returns the list of snapshots created by the specific db_instance
    43  
    44  * `db_snapshot_identifier` - (Optional) Returns information on a specific snapshot_id.
    45  
    46  * `snapshot_type` - (Optional) The type of snapshots to be returned. If you don't specify a SnapshotType 
    47  value, then both automated and manual snapshots are returned. Shared and public DB snapshots are not 
    48  included in the returned results by default. Possible values are, `automated`, `manual`, `shared` and `public`.
    49  
    50  * `include_shared` - (Optional) Set this value to true to include shared manual DB snapshots from other 
    51  AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false. 
    52  The default is `false`.
    53  
    54  * `include_public` - (Optional) Set this value to true to include manual DB snapshots that are public and can be 
    55  copied or restored by any AWS account, otherwise set this value to false. The default is `false`.
    56  
    57  
    58  ## Attributes Reference
    59  
    60  The following attributes are exported:
    61  
    62  * `id` - The snapshot ID.
    63  * `allocated_storage` - Specifies the allocated storage size in gigabytes (GB).
    64  * `availability_zone` - Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
    65  * `db_snapshot_arn` - The Amazon Resource Name (ARN) for the DB snapshot.
    66  * `encrypted` - Specifies whether the DB snapshot is encrypted.
    67  * `engine` - Specifies the name of the database engine.
    68  * `engine_version` - Specifies the version of the database engine.
    69  * `iops` - Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
    70  * `kms_key_id` - The ARN for the KMS encryption key.
    71  * `license_model` - License model information for the restored DB instance.
    72  * `option_group_name` - Provides the option group name for the DB snapshot.
    73  * `source_db_snapshot_identifier` - The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy.
    74  * `source_region` - The region that the DB snapshot was created in or copied from.
    75  * `status` - Specifies the status of this DB snapshot.
    76  * `storage_type` - Specifies the storage type associated with DB snapshot.
    77  * `vpc_id` - Specifies the storage type associated with DB snapshot.
    78  * `snapshot_create_time` - Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).