-
Notifications
You must be signed in to change notification settings - Fork 231
route53: hosted-zone-records #252
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
base: master
Are you sure you want to change the base?
Conversation
Thanks! I was thrilled to read what you created.
It looks like you've grokked BMA and solved your problem very nicely. TLDR The conversation is about to get philosophical but please don't let this hold you back BMA is aimed at letting you move fast and sometimes a slow moving Master actually You've raised some good questions:
BMA only uses However, someone mentioned a good list of I think the relevant limitation for this case is:
The options for BMA (in my order of preference) seem to be:
So, here's the first draft at a command to display all record sets for a route53 zone, using jq for parsing since the default awscli text output for this is a lot more difficult to handle. Note that some awscli help text still claims "list-resource-record-sets" only provides 100 recordsets at a time, but I don't see this behavior from the current endpoint. I get all results in one response, tested up to over 10,000 records in a single zone.
What did the ALIAS look like for your zone?
I noticed that the What are your use cases? List, create, update, delete records? I'd encourage you to go ahead and create them if the ROI for you justifies it. Perhaps the functionality will influence BMA to accept some more |
@mbailey isn't Unfortunately, I didn't notice this PR, so I wrote my custom implementation... I'll put the important bit here then:
|
Just a note I haven't forgotten this. I have been trying to figure out a way to do this with jmespath and also how to cover more of the route53 cases than just the bind-common ones, but yeah, the limitations of jmespath vs the lack of normalization of the different extensions to the records may be too much to overcome. |
Good start! If However, I've been using this locally using only jmespath aws route53 list-resource-record-sets \
--hosted-zone-id $(aws route53 list-hosted-zones --query 'HostedZones[?Name==`domain.com.`].Id' --output text | cut -d'/' -f3) \
--output text \
--query 'ResourceRecordSets[].[Name, TTL, Type, to_string(ResourceRecords[].Value)]' |
column -s$'\t' -t and it gives me the following output internal.snip.com. 172800 NS ["ns-snip.awsdns-00.co.uk.","ns-snip.awsdns-00.com.","ns-snip.awsdns-00.org.","ns-snip.awsdns-00.net."]
internal.snip.com. 900 SOA ["ns-snip.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"]
snip.internal.snip.com. 300 A ["snip"]
snip.internal.snip.com. 60 CNAME ["snip.cluster-snip.us-west-2.rds.amazonaws.com"] The only annoying thing is that the What do you think @mbailey ? |
Just so you folks know, I'm completely okay with this PR as-is. Any chance we can get this merged soon ? 😄 🙏 cc: @mbailey |
I just found this repo today and I'm thrilled, but I'm going to need more route53 support since we do a lot of that. So, here's the first draft at a command to display all record sets for a route53 zone, using jq for parsing since the default awscli text output for this is a lot more difficult to handle. Note that some awscli help text still claims "list-resource-record-sets" only provides 100 recordsets at a time, but I don't see this behavior from the current endpoint. I get all results in one response, tested up to over 10,000 records in a single zone.
I'm not really assuming this will be acceptable without more changes so I welcome feedback.
Particularly:
Last, AWS ALIAS records make anything like this a bit tricky but I went with what's usually the useful info and a fake TTL (similar to what cli53 does). It might need more detail later for action commands vs this basic query.