ec2_vpc_route_table - allow routes to be created if the CIDR already … (#45178)
* ec2_vpc_route_table - allow routes to be created if the CIDR already exists but its 'Origin' is 'EnableVgwRoutePropagation' (which cannot be replaced). (#43417)
Fixes #43415
(cherry picked from commit a6c97f2243
)
This commit is contained in:
parent
264c7c22fb
commit
cc4854fdad
2 changed files with 7 additions and 2 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- ec2_vpc_route_table - check the origin before replacing routes.
|
||||
Routes with the origin 'EnableVgwRoutePropagation' may not be replaced.
|
|
@ -432,8 +432,9 @@ def index_of_matching_route(route_spec, routes_to_match):
|
|||
for i, route in enumerate(routes_to_match):
|
||||
if route_spec_matches_route(route_spec, route):
|
||||
return "exact", i
|
||||
elif route_spec_matches_route_cidr(route_spec, route):
|
||||
return "replace", i
|
||||
elif 'Origin' in route_spec and route_spec['Origin'] != 'EnableVgwRoutePropagation':
|
||||
if route_spec_matches_route_cidr(route_spec, route):
|
||||
return "replace", i
|
||||
|
||||
|
||||
def ensure_routes(connection=None, module=None, route_table=None, route_specs=None,
|
||||
|
|
Loading…
Reference in a new issue