-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
New resource: aws_ami_description - lookup AMI via DescribeImages #4396
New resource: aws_ami_description - lookup AMI via DescribeImages #4396
Conversation
👍 for this kind of resource, but I have some suggestions. I think |
@antonbabenko, sorry but I disagree. The name is fine, I don't see the need to change it, same with the parameters. In fact both the resource name and filter parameter are modelled after the API call it consumes. To address the issue of why not have more finer grained parameters:
|
👍 This would really make life easier for me! |
Thanks for this, @vancluever. Over in #4169 we have been discussing a new concept for fetching data in Terraform, with finding AMIs being one example use-case. That would allow this result to be achieved in a more predictable way. That idea is still under discussion, so not necessarily a reason to block progress on this simpler change but note that the existing limitations with read-only resources described in that issue would apply to this AMI resource too. |
Thanks @apparentlymart, I have some thoughts I'll post over there too, also I'd love for this to be a pilot for that! I'm not too sure how far out it is, but once it's hashed out I'd be more than happy to do the work to make this a data source. In the meantime if there's anything else needed to get this merged let me know. |
8afda23
to
06440fc
Compare
Updated the PR with the
Also made a few corrections to the docs (filter values were not lists when they should have been). |
06440fc
to
4abb361
Compare
Another update - ensure a missing |
I would be interested to know - is there anything blocking this PR as it stands? |
Hey @ketzacoatl yeah I'm not too sure. Could be the HashiCorp folks are just backed up on other stuff. But yeah guys if there's anything that needs that is holding it up let me know. I have been using this in production now with some pretty good results and it's a part of one of my pipelines now, and soon to be part of a second. |
Can this be merged? Maybe @phinze , please? |
4abb361
to
e603843
Compare
Everyone - it's been a while since this PR is in, and I'm still using it, so I figured I'd give it a rebase to make it easier to merge. Would love to see this in upstream - even it it gets removed in 0.7 (and again, I would be totally fine with porting it over to a data source when that happens). |
1195457
to
24a0e31
Compare
@vancluever I was planning to use In which case, I expect we'd merge the data source equivalent of this as part of the data source work, as an end-to-end proof that it's working. |
Hey @apparentlymart, I was just typing a message! lol. I actually fat-fingered the delete button on this branch while doing some cleanup on our fork. Is there any way to restore the status on this PR? Whatever works. :) |
I'll reopen it for now and if I do end up merging something equivalent to this in the data sources work I'll come back and update it. |
Thanks @apparentlymart! And yeah, it's my hope that the work here and in #4848 would find its way into #4961. Cheers! |
24a0e31
to
c1f3baa
Compare
c1f3baa
to
9a7b289
Compare
Hey @apparentlymart, just wondering if you started work on this as a data source yet? If not, I can get it done. |
@vancluever I have not worked directly on this yet but in #6819 I have a general utility I also have these notes on the design methodology I was following for these, in ther hope of keeping them relatively consistent with each other: https://gist.github.com/apparentlymart/e62c81db609eca1fe08dc8226dd48485 |
@apparentlymart roger, I'll start work on it then! I'll take a look at that, sounds like based on name alone there might be some helpers there that I had to write for this as well, so I'll make sure to re-factor to use those. |
This data source allows one to look up the most recent AMI for a specific set of parameters, much like aws ec2 describe-images in the AWS CLI. Basically a refresh of hashicorp#4396, in data source form.
This data source allows one to look up the most recent AMI for a specific set of parameters, much like aws ec2 describe-images in the AWS CLI. Basically a refresh of hashicorp#4396, in data source form.
This data source allows one to look up the most recent AMI for a specific set of parameters, much like aws ec2 describe-images in the AWS CLI. Basically a refresh of hashicorp#4396, in data source form.
This data source allows one to look up the most recent AMI for a specific set of parameters, much like aws ec2 describe-images in the AWS CLI. Basically a refresh of hashicorp#4396, in data source form.
Now that #6911 is merged, closing this one off as we now have this in data source form with |
This data source allows one to look up the most recent AMI for a specific set of parameters, much like aws ec2 describe-images in the AWS CLI. Basically a refresh of hashicorp/terraform#4396, in data source form.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I made this resource because I wanted an easy way to look up the latest AWS NAT images. Of course, with the advent of the new NAT gateway and the respective resource in Terraform (which I just found out about today!), this is a bit moot, but I'm hoping this will find other use cases. I myself will be using this to simplify some of my build pipelines that require a pre-built instance, produced by things like packer.
Check it out, any questions or comments let me know. Docs are included in this PR, of course. Tests cover looking up a NAT instance, a Windows instance, and a Ubuntu instance store instance.