Skip to content

Instantly share code, notes, and snippets.

@jarshwah
Created February 9, 2019 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarshwah/bea3005fe13ba0376327406a9a452991 to your computer and use it in GitHub Desktop.
Save jarshwah/bea3005fe13ba0376327406a9a452991 to your computer and use it in GitHub Desktop.
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
loop.run_until_complete(coro)
File "/Users/josh/.pyenv/versions/3.6.4/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "/Users/josh/.local/share/virtualenvs/pulumi-eks-cluster-py-fAtfF6Zz/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 34, in run_in_stack
Stack(func)
File "/Users/josh/.local/share/virtualenvs/pulumi-eks-cluster-py-fAtfF6Zz/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 93, in __init__
func()
File "/usr/local/bin/pulumi-language-python-exec", line 84, in <lambda>
coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
File "/Users/josh/.pyenv/versions/3.6.4/lib/python3.6/runpy.py", line 280, in run_path
run_name, mod_spec, pkg_name).copy()
File "/Users/josh/.pyenv/versions/3.6.4/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./__main__.py", line 62, in <module>
availability_zone=get_aws_az(num),
File "./__main__.py", line 18, in get_aws_az
return zones.names[index]
AttributeError: 'coroutine' object has no attribute 'names'
error: an unhandled error occurred: Program exited with non-zero exit code: 1
subnet = ec2.Subnet(
subnet_name,
vpc_id=vpc.id,
availability_zone=pulumi_aws.get_availability_zones().names[num],
cidr_block=subnet_ranges[num],
map_public_ip_on_launch=True,
tags={"Name": subnet_name, **default_tags},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment