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

please return ChangeInfo.Id in response to awless create record #80

Closed
lakamsani opened this issue Mar 17, 2017 · 5 comments
Closed

please return ChangeInfo.Id in response to awless create record #80

lakamsani opened this issue Mar 17, 2017 · 5 comments

Comments

@lakamsani
Copy link

Hi, for this kind of command: awless create record type=A name=host.domain.com value=1.2.3.4 ttl=60 zone=Z12345 if you could return ChangeInfo.Id that would be helpful in scripts that want to do some actions later on using the new DNS name. I assume that command is using something like aws route53 change-resource-record-sets under the hood but definitely easier to use as we can simply supply the args on the command line instead of a json file.

The ChangeInfo.Id can be used for example check the status using aws route53 get-change --id <change-set-id> before doing other stuff with the new name.

fxaguessy added a commit that referenced this issue Mar 17, 2017
@fxaguessy
Copy link
Contributor

This has been added to master and will be in next release.
When you run a create command, for example, you have the id between []:

create record name=XXXXXX ttl=60 type=CNAME value=XXXX zone=/hostedzone/XXXX

Confirm? (y/n): y
[info]    Executed:
    OK	create record name=XXXXXX ttl=60 type=CNAME value=XXXX zone=/hostedzone/XXXXX	[/change/XXXXX]

[info]    Revert this template with `awless revert 01BBEJ74T0ZQ9HRHQF4BXXMEPK

@lakamsani
Copy link
Author

lakamsani commented Mar 17, 2017

Thank you very much. Is there a flag to skip the 'Confirm?' prompt?

@simcap
Copy link
Contributor

simcap commented Mar 17, 2017

Not yet but we intend to create one. It would be --force, -f mostly used on the awless run command. If you see other use cases let us know.

@lakamsani
Copy link
Author

lakamsani commented Mar 17, 2017

for awsless create and awless delete too especially for DNS records which are easy to recreate even if there is an 'oops' situation.

@simcap
Copy link
Contributor

simcap commented Mar 17, 2017

Yes of course.

I forgot of course to mention all the one-liners templates create, delete, .... (you can see them in the main menu under One-liner Template Commands:). So basically to sum up all operations involving resources creation, update, delete.

simcap added a commit that referenced this issue Mar 21, 2017
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

3 participants