Resource: awsAmiLaunchPermission
Adds a launch permission to an Amazon Machine Image (AMI).
Example Usage
AWS Account ID
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.amiLaunchPermission.AmiLaunchPermission(this, "example", {
accountId: "123456789012",
imageId: "ami-12345678",
});
Public Access
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.amiLaunchPermission.AmiLaunchPermission(this, "example", {
group: "all",
imageId: "ami-12345678",
});
Organization Access
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsOrganizationsOrganizationCurrent =
new aws.dataAwsOrganizationsOrganization.DataAwsOrganizationsOrganization(
this,
"current",
{}
);
new aws.amiLaunchPermission.AmiLaunchPermission(this, "example", {
imageId: "ami-12345678",
organizationArn: dataAwsOrganizationsOrganizationCurrent.arn,
});
Argument Reference
The following arguments are supported:
accountId
- (Optional) AWS account ID for the launch permission.group
- (Optional) Name of the group for the launch permission. Valid values:"all"
.imageId
- (Required) ID of the AMI.organizationArn
- (Optional) ARN of an organization for the launch permission.organizationalUnitArn
- (Optional) ARN of an organizational unit for the launch permission.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- Launch permission ID.
Import
AMI Launch Permissions can be imported using [accountId|groupName|organizationArn|organizationalUnitArn]/imageId
, e.g.,