github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/aws/r/ami_copy.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_ami_copy" 4 sidebar_current: "docs-aws-resource-ami-copy" 5 description: |- 6 Duplicates an existing Amazon Machine Image (AMI) 7 --- 8 9 # aws\_ami\_copy 10 11 The "AMI copy" resource allows duplication of an Amazon Machine Image (AMI), 12 including cross-region copies. 13 14 If the source AMI has associated EBS snapshots, those will also be duplicated 15 along with the AMI. 16 17 This is useful for taking a single AMI provisioned in one region and making 18 it available in another for a multi-region deployment. 19 20 Copying an AMI can take several minutes. The creation of this resource will 21 block until the new AMI is available for use on new instances. 22 23 ## Example Usage 24 25 ``` 26 resource "aws_ami_copy" "example" { 27 name = "terraform-example" 28 source_ami_id = "ami-xxxxxxxx" 29 source_ami_region = "us-west-1" 30 } 31 ``` 32 33 ## Argument Reference 34 35 The following arguments are supported: 36 37 * `name` - (Required) A region-unique name for the AMI. 38 * `source_ami_id` - (Required) The id of the AMI to copy. This id must be valid in the region 39 given by `source_ami_region`. 40 * `source_region` - (Required) The region from which the AMI will be copied. This may be the 41 same as the AWS provider region in order to create a copy within the same region. 42 43 ## Attributes Reference 44 45 The following attributes are exported: 46 47 * `id` - The ID of the created AMI. 48 49 This resource also exports a full set of attributes corresponding to the arguments of the 50 `aws_ami` resource, allowing the properties of the created AMI to be used elsewhere in the 51 configuration.