diff --git a/plugins/module_utils/waiters.py b/plugins/module_utils/waiters.py index ff1aac8822d..e1d98a5a847 100644 --- a/plugins/module_utils/waiters.py +++ b/plugins/module_utils/waiters.py @@ -250,6 +250,24 @@ }, ] }, + "VpcEndpointExists": { + "delay": 5, + "maxAttempts": 40, + "operation": "DescribeVpcEndpoints", + "acceptors": [ + { + "matcher": "path", + "expected": True, + "argument": "length(VpcEndpoints[]) > `0`", + "state": "success" + }, + { + "matcher": "error", + "expected": "InvalidVpcEndpointId.NotFound", + "state": "retry" + }, + ] + }, "VpnGatewayExists": { "delay": 5, "maxAttempts": 40, @@ -496,6 +514,12 @@ def rds_model(name): core_waiter.NormalizedOperationMethod( ec2.describe_subnets )), + ('EC2', 'vpc_endpoint_exists'): lambda ec2: core_waiter.Waiter( + 'vpc_endpoint_exists', + ec2_model('VpcEndpointExists'), + core_waiter.NormalizedOperationMethod( + ec2.describe_vpc_endpoints + )), ('EC2', 'vpn_gateway_exists'): lambda ec2: core_waiter.Waiter( 'vpn_gateway_exists', ec2_model('VpnGatewayExists'),