https://pulumi.com logo
a

alert-france-93241

10/08/2019, 8:18 AM
I am trying to write a Pulumi script to create a new volume and also support attaching the create volume to the instance (in case the instance is deleted and replaced) in every update.
s

stocky-spoon-28903

10/08/2019, 8:25 AM
In that case I think you just need an
aws.ec2.EbsVolume
resource and an
aws.ec2.EbsVolumeAttachment
resource
a

alert-france-93241

10/08/2019, 8:56 AM
and how do I ensure that the existing EbsVolume is attached to the instance in case the instance was replaced?
s

stocky-spoon-28903

10/08/2019, 1:25 PM
That’s what the attachment resource does