Closed Evisort-Dave closed 1 year ago
There is no effect on having an ephemeral instance store listed in the block device mappings. Either they are present based on the instance type or they are not. To utilize, you will need to mount them, typically through user data
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
As the
type
of theblock_device_mappings
is currently set tolist(any)
, this prevents you from being able to specify e.g. an EBS volume (which requires anebs {}
configuration block), as well as an instance store volume (which requires thevirtual_name
attribute), as the object structure of each list item will not match and this will fail Terraform's type checking.Versions
Module version [Required]: terraform-aws-modules/autoscaling/aws 6.7.1
Terraform version: 1.0.11
Provider version(s):
provider registry.terraform.io/hashicorp/aws v4.49.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Create an ASG with the above
block_device_mappings
config.Expected behavior
The configuration allows me to specify a launch template with both an EBS volume and an instance store volume on the same instance.
Actual behavior
The above configuration will fail with the error all list elements must have the same type.
Additional context
I'm not able to find a workaround here, as I can't make the elements match by e.g. adding
virtual_name = null
to the EBS element, as it won't match the string type of the second element, and if I set it to a blank string, the provider crashes.Any ideas?