Skip to content

Autodetection#5

Open
namliz wants to merge 3 commits intohashicorp:masterfrom
namliz:autodetection
Open

Autodetection#5
namliz wants to merge 3 commits intohashicorp:masterfrom
namliz:autodetection

Conversation

@namliz
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

namliz commented Mar 12, 2019

@i0rek any updates on this?

@hashicorp-cla
Copy link
Copy Markdown

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