mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Fix boto_route53 bug with (multiple) VPCs
This is a workaround because there is/was a bug in boto (see boto/boto#3061 and boto/boto#2882 for more info) where VPCs were a list with multiple, or a dict with one VPC. Now it won't matter if the return is a dict or a list, we'll correctly process it.
This commit is contained in:
parent
7b23327bf8
commit
78df3f2b9a
2 changed files with 6 additions and 2 deletions
1
changelog/57139.fixed
Normal file
1
changelog/57139.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Fix boto_route53 issue with (multiple) VPCs.
|
|
@ -526,8 +526,11 @@ def hosted_zone_present(
|
|||
create = True
|
||||
else:
|
||||
if private_zone:
|
||||
for v, d in deets.get("VPCs", {}).items():
|
||||
if d["VPCId"] == vpc_id and d["VPCRegion"] == vpc_region:
|
||||
vpcs = deets.get("VPCs", [])
|
||||
if isinstance(vpcs, dict):
|
||||
vpcs = vpcs.values()
|
||||
for vpc in vpcs:
|
||||
if vpc["VPCId"] == vpc_id and vpc["VPCRegion"] == vpc_region:
|
||||
create = False
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue