terraform/builtin
Doug Neal babc52202c Succeed creating aws_volume_attachment if identical attachment exists (#11060)
If an `aws_volume_attachment` is identical to one that already exists in
the API, don't attempt to re-create it (which fails), simply act as
though the creation command had already been run and continue.

This allows Terraform to cleanly recover from a situation where a volume
attachment action hangs indefinitely, possibly due to a bad instance
state, requiring manual intervention such as an instance reboot. In such
a situation, Terraform believes the attachment has failed, when in fact
it succeeded after the timeout had expired. On the subsequent retry run,
attempting to re-create the attachment will fail outright, due to the
AttachVolume API call being non-idempotent. This patch implements the
idempotency client-side by matching the (name, vID, iID) tuple.

Note that volume attachments are not assigned an ID by the API.
2017-02-01 15:41:53 +00:00
..
bins update privisioner bins to use new functions 2017-01-26 15:09:15 -08:00
providers Succeed creating aws_volume_attachment if identical attachment exists (#11060) 2017-02-01 15:41:53 +00:00
provisioners Merge pull request #10934 from hashicorp/f-provisioner-stop 2017-01-30 12:53:15 -08:00