@@ -104,18 +104,39 @@ Optional:
104104 must be set to ` uefi ` .
105105
106106- ` platform ` (string) - The operating system of the virtual machine. One of:
107- ` linux ` or ` windows ` . If ` boot_mode ` is set to ` uefi ` then this value must be
108- set to either ` windows ` or ` linux ` depending on the operating system of the
109- virtual machine.
107+ ` linux ` or ` windows ` . If ` boot_mode ` is set to ` uefi ` then this value must be
108+ set to either ` windows ` or ` linux ` depending on the operating system of the
109+ virtual machine. ` windows ` can only be used here when ` import_type ` is ` image ` .
110110
111111- ` custom_endpoint_ec2 ` (string) - This option is useful if you use a cloud
112112 provider whose API is compatible with aws EC2. Specify another endpoint
113113 like this ` https://ec2.custom.endpoint.com ` .
114114
115+ - ` ena_support ` (boolean) - Only applicable if ` import_type ` is set to
116+ ` snapshot ` . This sets a flag on the AMI indicating that the image includes
117+ support for the
118+ [ Elastic Network Adapter] ( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-ena.html ) .
119+ Defaults to ` false ` .
120+
115121- ` format ` (string) - One of: ` ova ` , ` raw ` , ` vhd ` , ` vhdx ` , or ` vmdk ` . This
116122 specifies the format of the source virtual machine image. The resulting
117123 artifact from the builder is assumed to have a file extension matching the
118- format. This defaults to ` ova ` .
124+ format. This defaults to ` ova ` if ` import_type ` is ` image ` , and ` raw ` if
125+ ` import_type ` is ` snapshot ` .
126+
127+ - ` import_type ` (string) - The method to use to import the image.
128+ One of: ` image ` or ` snapshot ` . If set to ` image ` , the
129+ [ ImportImage] ( https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html )
130+ API is used to perform the import, which only supports a limited number of
131+ [ operating systems] ( https://docs.aws.amazon.com/vm-import/latest/userguide/prerequisites.html#vmimport-operating-systems )
132+ and performs
133+ [ programmatic modifications] ( https://docs.aws.amazon.com/vm-import/latest/userguide/import-modify-vm.html )
134+ to the image during the import process. If set to ` snapshot ` , the
135+ [ ImportSnapshot] ( https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html )
136+ API is used and then the resulting snapshot is registered as an AMI, which
137+ does not perform any modifications to the image, supports a wider range of
138+ Linux distributions, but does not support importing Windows images.
139+ The default is ` image ` .
119140
120141- ` insecure_skip_tls_verify ` (boolean) - This allows skipping TLS
121142 verification of the AWS EC2 endpoint. The default is ` false ` .
@@ -127,7 +148,8 @@ Optional:
127148 Machine Image (AMI) after importing. Valid values: ` AWS ` or ` BYOL `
128149 (default). For more details regarding licensing, see
129150 [ Prerequisites] ( http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html )
130- in the VM Import/Export User Guide.
151+ in the VM Import/Export User Guide. If ` import_type ` is set to ` snapshot ` , this
152+ is ignored.
131153
132154- ` mfa_code ` (string) - The MFA
133155 [ TOTP] ( https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm )
@@ -169,6 +191,10 @@ Optional:
169191- ` skip_region_validation ` (boolean ) - Set to true if you want to skip
170192 validation of the region configuration option . Default ` false ` .
171193
194+ - ` snapshot_device_name ` (string ) - The root device name to use in the block
195+ device mapping when registering a snapshot import as an AMI . Only applicable
196+ if ` import_type ` is ` snapshot ` . Defaults to ` /dev/sda ` .
197+
172198- ` tags ` (object of key /value strings ) - Tags applied to the created AMI and
173199 relevant snapshots .
174200
@@ -177,6 +203,11 @@ Optional:
177203 probably don't need it. This will also be read from the ` AWS_SESSION_TOKEN `
178204 environmental variable.
179205
206+ - ` virtualization_type ` (string) - The virtualization type to be used for
207+ the imported AMI. One of: ` hvm ` or ` paravirtual ` . Defaults to ` hvm ` ,
208+ ` paravirtual ` is only supported on previous-generation EC2 instance types.
209+ This option can only be set when ` import_type ` is set to ` snapshot ` .
210+
180211## Basic Example
181212
182213Here is a basic example. This assumes that the builder has produced an OVA
0 commit comments