alert-raincoat-81485
02/22/2021, 9:57 PMaws:ec2:VolumeAttachment (ebsatt1-asg03):
error: deleting urn:pulumi:asg-ex-03::asg::aws:ec2/volumeAttachment:VolumeAttachment::ebsatt1-asg03: 1 error occurred:
* Failed to detach Volume (vol-*********) from Instance (i-*******): IncorrectState: Volume 'vol-*******' is in the 'available' state.
status code: 400, request id: 80154710-********
While checking it from the Ui, it shows the volumes are already detached from the instances, also instances are terminated.
I deleted the volumes manually, but showing the same error messages while running pulumi destroy. Can someone explain the issue here?witty-candle-66007
02/22/2021, 10:01 PMpulumi refresh -y
that will synchronize Pulumi state with AWS and then allow you to do the pulumi destroy
alert-raincoat-81485
02/22/2021, 10:07 PMavailable
means the EBS volumes are already detached from the instance and it’s available
to use/attach to other instances.
It make sense while pulumi prompts an error message of “failed to detach volume” while EBS is in-use
state.Failed to detach Volume (vol-*********) from Instance (i-*******): IncorrectState: Volume 'vol-*******' is in the 'available' state.
status code: 400, request id: 80154710-********
it shows the volume pulumi is trying to detach is already detached an already in available
statewitty-candle-66007
02/22/2021, 10:20 PMstatus code: 400...
bit.
Did you try the pulumi refresh
? That will update Pulumi’s state to synchronize it with AWS - essentially detaching the volume in the state model. That should then allow subsequent pulumi up
or pulumi destroy
to proceed as expected.billowy-army-68599
02/22/2021, 10:28 PM