def METHOD_NAME(module):
    params = module.params
    state = params.get('state')
    name = params.get('name')
    mount_point = params.get('mount_point')
    client = hashivault_auth_client(params)
    if state == 'present':
        custom_secret_id = params.get('secret')
        if custom_secret_id is None:
            custom_secret_id = params.get('secret_id')  # deprecated
        cidr_list = params.get('cidr_list')
        metadata = params.get('metadata')
        if custom_secret_id is not None:
            if module.check_mode:
                try:
                    client.auth.approle.read_secret_id(name, custom_secret_id, mount_point=mount_point)
                except Exception:
                    return {'changed': True}
                return {'changed': False}
            result = client.auth.approle.create_custom_secret_id(role_name=name,
                                                                 mount_point=mount_point,
                                                                 secret_id=custom_secret_id,
                                                                 metadata=metadata)
        else:
            if module.check_mode:
                return {'changed': True}
            result = client.auth.approle.generate_secret_id(role_name=name,
                                                            mount_point=mount_point,
                                                            metadata=metadata,
                                                            cidr_list=cidr_list)
        data = result.get('data', {})
        secret_id = data.get('secret_id', '')
        return {'changed': True, 'data': data, 'id': secret_id}
    elif state == 'absent':
        secret = params.get('secret')
        if module.check_mode:
            try:
                client.auth.approle.read_secret_id(name, secret, mount_point=mount_point)
            except Exception:
                return {'changed': False}
            return {'changed': True}
        else:
            client.auth.approle.destroy_secret_id(name, secret, mount_point=mount_point)
        return {'changed': True}
    else:
        return {'failed': True, 'msg': 'Unkown state value: {}'.format(state)}