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

cloudformation & region #1

Open
lavie opened this issue Mar 2, 2015 · 3 comments
Open

cloudformation & region #1

lavie opened this issue Mar 2, 2015 · 3 comments

Comments

@lavie
Copy link

lavie commented Mar 2, 2015

Very cool script. Thank you.

Would be great if it had a --cfn option to generate host names based on logical-resource-id. And also the ability to concat the region name (which is seldom a tag) to the host name.
So host name in this mode would be, e.g. [CFN stack name]-[CFN logical name]-[region].
Just a thought.

@gianlucaborello
Copy link
Owner

Thanks a lot for your feedback.

I added a --region option that adds the region (and AZ) at the end of the host name. About cloudformation, if I correctly understand, your request that can already be achieved with tags:

python aws-ssh-config.py --tags aws:cloudformation:stack-name,aws:cloudformation:logical-id --region

Let me know if it doesn't work the way you wanted it to!

@lavie
Copy link
Author

lavie commented Mar 2, 2015

Oh, of course! You're right. Tags do work for CFN resources. I guess what I really meant is to ignore click-resources, or anything not generated by CFN. See, what I got when I used the script was all my stack resources properly named (except for the region thing - and thanks for adding that, btw), but I also got a pile of various click-resources that weren't properly named. I guess lots of accounts have those lying around. That's what made me think that --cfn mode, where e.g. you could just filter out all the stuff that's not created by CFN, would be a good idea.
But now that I think of it, all I really need is a filter option. If there were a white-list filter (tag based) I could filter out non-CFN resources, and I could even generate host configs just for specific stacks, if I wanted to.

In any case, I really appreciate your quick response and help.

@gianlucaborello
Copy link
Owner

Sounds like a great idea, give me a bit and I'll implement a --filter switch

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

No branches or pull requests

2 participants