38 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2020-03-18 18:46:47 -04:00
<!-- Code generated from the comments of the BlockDevice struct in builder/amazon/common/block_device.go; DO NOT EDIT MANUALLY -->
2020-08-14 02:35:35 -07:00
These will be attached when launching your instance. Your
2020-03-18 18:46:47 -04:00
options here may vary depending on the type of VM you use.
Example use case:
The following mapping will tell Packer to encrypt the root volume of the
build instance at launch using a specific non-default kms key:
JSON example:
2020-07-17 15:52:11 -07:00
2020-03-18 18:46:47 -04:00
```json
2020-08-14 02:35:35 -07:00
launch_block_device_mappings: [
2020-07-17 15:52:11 -07:00
{
"device_name": "/dev/sda1",
"encrypted": true,
"kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
}
]
```
HCL2 example:
2020-07-17 15:52:11 -07:00
```hcl
2020-08-14 02:35:35 -07:00
launch_block_device_mappings {
2020-07-17 15:52:11 -07:00
device_name = "/dev/sda1"
encrypted = true
kms_key_id = "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
}
```
2020-08-14 02:35:35 -07:00
Please note that the kms_key_id option in this example exists for
launch_block_device_mappings but not ami_block_device_mappings.
2020-03-18 18:46:47 -04:00
Documentation for Block Devices Mappings can be found here:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html