Define the lookup_ebs_volumes attribute of the EBS variable as true. This will cause the "ebs_volume" module to include all matching EBS volumes in the returned map using the volume-id as keys. Optionally, use the filter attribute to limit the EBS volumes returned.
If no filter is supplied, all EBS volumes will be contained in the map, including volumes created by Terraform. It is recommended to use a filter to prevent the map from containing duplicates with multiple keys referencing the same EBS volumes, however, it is not required.
Use the external_disk attribute to attach one of the external EBS volumes to a VM. The ID of the volume can be used to reference the unmanaged disk. The EBS volume must be in the same availability zone as the instance to be attached.
See the output from the ebs_volume module below for an example of how the keys from the returned map appear for the different types of storage configurations.