lint: various non-semantic fixes
This commit is contained in:
parent
7a731f6999
commit
7a54e4ea96
2 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,7 @@ class BridgeAutomation(TerraformAutomation):
|
|||
Bridge.deprecated.is_(None)
|
||||
).all()
|
||||
if len(active_bridges) < bridgeconf.number:
|
||||
for i in range(bridgeconf.number - len(active_bridges)):
|
||||
for _idx in range(bridgeconf.number - len(active_bridges)):
|
||||
bridge = Bridge()
|
||||
bridge.conf_id = bridgeconf.id
|
||||
bridge.added = datetime.datetime.utcnow()
|
||||
|
|
|
@ -145,6 +145,7 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
|
|||
if "child_modules" not in state['values']['root_module']:
|
||||
# There are no CloudFront proxies deployed to import state for
|
||||
return
|
||||
# CloudFront distributions (proxies)
|
||||
for mod in state['values']['root_module']['child_modules']:
|
||||
if mod['address'].startswith('module.cloudfront_'):
|
||||
for res in mod['resources']:
|
||||
|
@ -154,6 +155,7 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
|
|||
proxy.slug = res['values']['id']
|
||||
proxy.terraform_updated = datetime.datetime.utcnow()
|
||||
break
|
||||
# EC2 instances (smart proxies)
|
||||
for g in state["values"]["root_module"]["child_modules"]:
|
||||
if g["address"].startswith("module.smart_proxy_"):
|
||||
group_id = int(g["address"][len("module.smart_proxy_"):])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue