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

Autodetection #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Autodetection #5

wants to merge 3 commits into from

Conversation

namliz
Copy link

@namliz namliz commented Jan 2, 2019

As per aws/aws-sdk-go#1103 the AWS SDK leaves it up to users to set or discover the region if AWS_REGION is not set. This is convenient so I've added it.

Additionally I've added an aws-namespace flag so you can specify the namespace via a human readable name and it sets aws-namespace-id for you if it finds it.

@namliz
Copy link
Author

namliz commented Jan 2, 2019

I think you should also take 469c735.

Currently the service address and port are blank, all the info is in the ServiceMeta section instead.

The changes I've made mean one could do:

$ consul-aws sync-catalog -to-consul -aws-service-prefix=aws_ -aws-namespace elasticache
$ dig +short aws_foo.service.consul
foo.xxxxxx.0001.usw2.cache.amazonaws.com.
172.42.42.242

screen shot 2019-01-01 at 7 07 06 pm

There is some weirdness with the phony consul-aws node having a fake ip but I don't really see the harm in that. I think these changes are in the spirit of what this this tool is trying to accomplish, certainly fits my use case very well now but I'd love to hear your thinking around this.

@hanshasselberg
Copy link
Member

Thank you for your work @Zilman! I will review them end of this week or beginning of next week since it requires some testing on my side.

@namliz
Copy link
Author

namliz commented Mar 12, 2019

@i0rek any updates on this?

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

3 participants