Resource: aws_ami_launch_permission#
Adds a launch permission to an image.
Example Usage#
AWS Account ID#
resource "aws_ami_launch_permission" "example" {
image_id = "cmi-12345678"
account_id = "123456789012"
}
Public Access#
# The cloud currently restricts adding public access permissions to images.
# Applying the resource must throw an error.
resource "aws_ami_launch_permission" "example" {
image_id = "cmi-12345678"
group = "all"
}
Argument Reference#
The following arguments are supported:
account_id
- (Optional) The project ID (project@customer
) for the launch permission.group
- (Optional) The name of the group for the launch permission. Valid values:"all"
.image_id
- (Required) The ID of the image.
Attributes Reference#
Supported attributes#
In addition to all arguments above, the following attributes are exported:
id
- Launch permission ID.
Unsupported attributes#
~> Note These attributes may be present in the terraform.tfstate
file but they have preset values and cannot be specified in configuration files.
The following attributes are not currently supported:
organization_arn
, organizational_unit_arn
.
Import#
-> Unsupported operation Import image launch permission is currently unsupported.
Image launch permissions can be imported using [ACCOUNT-ID|GROUP-NAME]/IMAGE-ID
, e.g.,
$ terraform import aws_ami_launch_permission.example 123456789012/cmi-12345678