Detach an EBS volume from an EC2 instance.

    .. versionadded:: 2016.11.0

    volume_id
        (string) – The ID of the EBS volume to be deleted.
    force
        (bool) – Forces deletion even if the device has not yet been detached from its instance.

    returns
        (bool) - True on success, False on failure.

    CLI Example:

    .. code-block:: bash

        salt-call boto_ec2.delete_volume vol-12345678

def delete_volume(volume_id, instance_id=None, device=None, force=False,
                  region=None, key=None, keyid=None, profile=None):
    '''
    Detach an EBS volume from an EC2 instance.

    .. versionadded:: 2016.11.0

    volume_id
        (string) – The ID of the EBS volume to be deleted.
    force
        (bool) – Forces deletion even if the device has not yet been detached from its instance.

    returns
        (bool) - True on success, False on failure.

    CLI Example:

    .. code-block:: bash

        salt-call boto_ec2.delete_volume vol-12345678

    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        return conn.delete_volume(volume_id)
    except boto.exception.BotoServerError as e:
        if not force:
            log.error(e)
            return False
    try:
        conn.detach_volume(volume_id, force=force)
        return conn.delete_volume(volume_id)
    except boto.exception.BotoServerError as e:
        log.error(e)
        return False