Skip to content

Add ability to override block device mapping configurations for all devices #585

@jakauppila

Description

@jakauppila

🙍 Problem Statement

To override configurations within block_device_mappings you need to call out each define and each configuration

block_device_mappings:
  - device_name: /dev/sda
    ebs:
      volume_size: 20
      delete_on_termination: true
  - device_name: /dev/sdb
    ebs:
      volume_type: gp2
      virtual_name: test
      volume_size: 15
      delete_on_termination: true
      snapshot_id: snap-0015d0bc

https://kitchen.ci/docs/drivers/aws/#disk-configuration

It would be great if we could override (or provide defaults) for all devices with a single configuration.

❔ Possible Solution

I'm not sure the best way to combine the configuration in this case, do we need a new block that can provide defaults when building the object?

block_device_mappings_defaults:
    ebs:
      volume_type: gp3
      volume_size: 8
      delete_on_termination: true

⤴️ Describe alternatives you've considered

➕ Additional context

I'd be happy to implement this change if there's agreement on how to define the configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions