mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
added handling for the aws error ConflictingDomainExists
This commit is contained in:
parent
611ca1fc03
commit
d22ed7dffa
1 changed files with 4 additions and 0 deletions
|
@ -544,6 +544,10 @@ def associate_vpc_with_hosted_zone(HostedZoneId=None, Name=None, VPCId=None,
|
|||
r = conn.associate_vpc_with_hosted_zone(**args)
|
||||
return _wait_for_sync(r['ChangeInfo']['Id'], conn)
|
||||
except ClientError as e:
|
||||
if e.response.get('Error', {}).get('Code') == 'ConflictingDomainExists':
|
||||
log.debug('VPC Association already exists.')
|
||||
# return True since the current state is the desired one
|
||||
return True
|
||||
if tries and e.response.get('Error', {}).get('Code') == 'Throttling':
|
||||
log.debug('Throttled by AWS API.')
|
||||
time.sleep(3)
|
||||
|
|
Loading…
Add table
Reference in a new issue