|
|
|
|
@ -44,10 +44,11 @@ func (blockDevice BlockDevice) BuildEC2BlockDeviceMapping() *ec2.BlockDeviceMapp
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (b *BlockDevice) Prepare(ctx *interpolate.Context) error {
|
|
|
|
|
if b.DeviceName == "" {
|
|
|
|
|
return fmt.Errorf("The `device_name` must be specified " +
|
|
|
|
|
"for every device in the block device mapping.")
|
|
|
|
|
err := b.BlockDevice.Prepare(ctx)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warn that encrypted must be true when setting kms_key_id
|
|
|
|
|
if b.KmsKeyId != "" && b.Encrypted != nil && *b.Encrypted == false {
|
|
|
|
|
return fmt.Errorf("The device %v, must also have `encrypted: "+
|
|
|
|
|
|