Skip to content

Commit

Permalink
Add waiter for ec2_vpc_endpoint (ansible-collections#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
jillr authored Feb 25, 2021
1 parent 8bbf81b commit 76aeec2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions plugins/module_utils/waiters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 76aeec2

Please sign in to comment.