Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be nifty to be able to resolve EC2 metadata #15

Closed
hairyhenderson opened this issue Mar 21, 2016 · 3 comments
Closed

Would be nifty to be able to resolve EC2 metadata #15

hairyhenderson opened this issue Mar 21, 2016 · 3 comments

Comments

@hairyhenderson
Copy link
Owner

This is perhaps overkill, but it'd be useful to resolve AWS EC2 metadata:

{{ec2meta "instance-id"}}

Or even to go so far as:

{{ec2tag "Name"}}

One thing I can't figure out is how to best get the region... Maybe as simple as {{ec2region}}

@hairyhenderson
Copy link
Owner Author

Ok, we have ec2meta now (#20). It grabs from the meta-data/ URL so I need something to grab from the dynamic/ URL.

@hairyhenderson
Copy link
Owner Author

dynamic/ is handled by #23.

Getting the region can now be done, but it's not pretty:

$ echo '{{ (ec2dynamic "instance-identity/document" | json).region }}' | gomplate
us-east-1

It'd especially be useful to be able to parse the instance-identity document more easily like {{ec2something "region"}}... But for now it's 💤-time.

@hairyhenderson
Copy link
Owner Author

Got tags and region covered by #24. Sweet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant