Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple storage device mappings #74

Closed
lyubomirdimov opened this issue Jul 21, 2021 · 0 comments · Fixed by #84
Closed

Allow multiple storage device mappings #74

lyubomirdimov opened this issue Jul 21, 2021 · 0 comments · Fixed by #84

Comments

@lyubomirdimov
Copy link

lyubomirdimov commented Jul 21, 2021

In certain cases, the launch template should create multiple device mappings. Such case is Bottlerocket Custom AMI, which requires mapping for /dev/xvda and /dev/xvdb (https://github.com/bottlerocket-os/bottlerocket#default-volumes).

The code at the moment, provides a static mapping for /dev/xvda:

  block_device_mappings {
    device_name = "/dev/xvda"

    ebs {
      volume_size = var.disk_size
      volume_type = var.disk_type
      kms_key_id  = var.launch_template_disk_encryption_enabled && length(var.launch_template_disk_encryption_kms_key_id) > 0 ? var.launch_template_disk_encryption_kms_key_id : null
      encrypted   = var.launch_template_disk_encryption_enabled
    }
  }

It would be great if we can make those mappings dynamic. I will submit a PR soon with the requested changes.

Update
PR - #75

Additional Context

Related issue, which I recently closed - #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant