diff --git a/plugins/modules/ec2_vpc_vgw.py b/plugins/modules/ec2_vpc_vgw.py index 123c467b131..07818341109 100644 --- a/plugins/modules/ec2_vpc_vgw.py +++ b/plugins/modules/ec2_vpc_vgw.py @@ -241,8 +241,9 @@ def create_vgw(client, module): try: response = client.create_vpn_gateway(aws_retry=True, **params) + # XXX get_waiter doesn't like being passed a 'decorated' client get_waiter( - client, 'vpn_gateway_exists' + client.client, 'vpn_gateway_exists' ).wait( VpnGatewayIds=[response['VpnGateway']['VpnGatewayId']] ) @@ -423,7 +424,8 @@ def ensure_vgw_present(client, module): # detach the existing vpc from the virtual gateway vpc_to_detach = current_vpc_attachments[0]['VpcId'] detach_vgw(client, module, vpn_gateway_id, vpc_to_detach) - get_waiter(client, 'vpn_gateway_detached').wait(VpnGatewayIds=[vpn_gateway_id]) + # XXX get_waiter doesn't like being passed a 'decorated' client + get_waiter(client.client, 'vpn_gateway_detached').wait(VpnGatewayIds=[vpn_gateway_id]) attached_vgw = attach_vgw(client, module, vpn_gateway_id) changed = True else: