Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #86 from lejmr/patch-1
Browse files Browse the repository at this point in the history
Workaround for situations when name_key is not defined
  • Loading branch information
Cryptophobia authored Apr 6, 2018
2 parents 720ae3d + 933e917 commit c9276d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ati/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ def aws_host(resource, module_name, **kwargs):
except KeyError:
ssh_host_key = 'public_ip'

name = resource['primary']['attributes'][name_key]
try:
name = resource['primary']['attributes'][name_key]
except:
name = resource['primary']['attributes'][ssh_host_key]
raw_attrs = resource['primary']['attributes']

groups = []
Expand Down

0 comments on commit c9276d7

Please sign in to comment.