FEATURES PRICING ABOUT DOCS LOGIN

aws_ami_copy

The “AMI copy” resource allows duplication of an Amazon Machine Image (AMI), including cross-region copies.

If the source AMI has associated EBS snapshots, those will also be duplicated along with the AMI.

This is useful for taking a single AMI provisioned in one region and making it available in another for a multi-region deployment.

Copying an AMI can take several minutes. The creation of this resource will block until the new AMI is available for use on new instances.

Example Usage

resource "aws_ami_copy" "example" {
    name = "terraform-example"
    description = "A copy of ami-xxxxxxxx"
    source_ami_id = "ami-xxxxxxxx"
    source_ami_region = "us-west-1"
    tags {
        Name = "HelloWorld"
    }
}

Argument Reference

The following arguments are supported:

This resource also exposes the full set of arguments from the aws_ami resource.

Attributes Reference

The following attributes are exported:

This resource also exports a full set of attributes corresponding to the arguments of the aws_ami resource, allowing the properties of the created AMI to be used elsewhere in the configuration.


See the source of this document at Terraform.io

REQUEST A DEMO