Skip to content

Commit e9acf96

Browse files
committed
Work around get_waiter not knowing how to cope with _RetryingBotoClientWrapper
1 parent 74a074b commit e9acf96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/modules/ec2_vpc_vgw.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ def create_vgw(client, module):
241241

242242
try:
243243
response = client.create_vpn_gateway(aws_retry=True, **params)
244+
# XXX get_waiter doesn't like being passed a 'decorated' client
244245
get_waiter(
245-
client, 'vpn_gateway_exists'
246+
client.client, 'vpn_gateway_exists'
246247
).wait(
247248
VpnGatewayIds=[response['VpnGateway']['VpnGatewayId']]
248249
)
@@ -423,7 +424,8 @@ def ensure_vgw_present(client, module):
423424
# detach the existing vpc from the virtual gateway
424425
vpc_to_detach = current_vpc_attachments[0]['VpcId']
425426
detach_vgw(client, module, vpn_gateway_id, vpc_to_detach)
426-
get_waiter(client, 'vpn_gateway_detached').wait(VpnGatewayIds=[vpn_gateway_id])
427+
# XXX get_waiter doesn't like being passed a 'decorated' client
428+
get_waiter(client.client, 'vpn_gateway_detached').wait(VpnGatewayIds=[vpn_gateway_id])
427429
attached_vgw = attach_vgw(client, module, vpn_gateway_id)
428430
changed = True
429431
else:

0 commit comments

Comments
 (0)