Reference External EBS Variables
Define EBS Volumes
Define the volumes
attribute of the EBS variable to create EBS volumes independently from any particular instance. These volumes can be created without being attached to an instance. They can then be attached and detached as needed.
Attach EBS Volumes to Instances
Use the external_disk
attribute to attach one of the external EBS volumes to a VM. The EBS volume must be in the same availability zone as the instance to be attached.
See the output from the ebs_volume
module here for an example of how the keys from the returned map appear for the different types of storage configurations.