Succeed creating aws_volume_attachment if identical attachment exists (#11060)
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.
ClementCunin/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,ClementCunin/terraform-provider-aws,kjmkznr/terraform-provider-aws,Ninir/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,terraform-providers/terraform-provider-aws,Ninir/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,kjmkznr/terraform-provider-aws,ashinohara/terraform-provider-aws,Ninir/terraform-provider-aws,ashinohara/terraform-provider-aws,kjmkznr/terraform-provider-aws,Ninir/terraform-provider-aws,ClementCunin/terraform-provider-aws,kjmkznr/terraform-provider-aws,terraform-providers/terraform-provider-aws,ClementCunin/terraform-provider-aws,nbaztec/terraform-provider-aws,terraform-providers/terraform-provider-aws,nbaztec/terraform-provider-aws,ashinohara/terraform-provider-aws,nbaztec/terraform-provider-aws,ashinohara/terraform-provider-aws,terraform-providers/terraform-provider-aws,nbaztec/terraform-provider-aws