github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/providers/aws/r/ami_from_instance.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_ami_from_instance"
     4  sidebar_current: "docs-aws-resource-ami-from-instance"
     5  description: |-
     6    Creates an Amazon Machine Image (AMI) from an EBS-backed EC2 instance
     7  ---
     8  
     9  # aws\_ami\_from\_instance
    10  
    11  The "AMI from instance" resource allows the creation of an Amazon Machine
    12  Image (AMI) modelled after an existing EBS-backed EC2 instance.
    13  
    14  The created AMI will refer to implicitly-created snapshots of the instance's
    15  EBS volumes and mimick its assigned block device configuration at the time
    16  the resource is created.
    17  
    18  This resource is best applied to an instance that is stopped when this instance
    19  is created, so that the contents of the created image are predictable. When
    20  applied to an instance that is running, *the instance will be stopped before taking
    21  the snapshots and then started back up again*, resulting in a period of
    22  downtime.
    23  
    24  Note that the source instance is inspected only at the initial creation of this
    25  resource. Ongoing updates to the referenced instance will not be propagated into
    26  the generated AMI. Users may taint or otherwise recreate the resource in order
    27  to produce a fresh snapshot.
    28  
    29  ## Example Usage
    30  
    31  ```
    32  resource "aws_ami_from_instance" "example" {
    33      name = "terraform-example"
    34      source_instance_id = "i-xxxxxxxx"
    35  }
    36  ```
    37  
    38  ## Argument Reference
    39  
    40  The following arguments are supported:
    41  
    42  * `name` - (Required) A region-unique name for the AMI.
    43  * `source_instance_id` - (Required) The id of the instance to use as the basis of the AMI.
    44  * `snapshot_without_reboot` - (Optional) Boolean that overrides the behavior of stopping
    45    the instance before snapshotting. This is risky since it may cause a snapshot of an
    46    inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
    47    guarantees that no filesystem writes will be underway at the time of snapshot.
    48  
    49  ## Attributes Reference
    50  
    51  The following attributes are exported:
    52  
    53  * `id` - The ID of the created AMI.
    54  
    55  This resource also exports a full set of attributes corresponding to the arguments of the
    56  `aws_ami` resource, allowing the properties of the created AMI to be used elsewhere in the
    57  configuration.