-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Get 'value' of particular tag 'key' of aws resource. #1423
Comments
Can someone explain how this configuration is supposed to work? Here's what I have:
Which produces the following output:
I've updated the terraform output line with the following tests: Tested with both terraform 8.8 and 9.11 |
Hi @dspatil, @coingraham, In my previous reply in the other issue I'd forgotten that (due to a historical mistake) the I think there was another bug open for this somewhere but since I wasn't able to find it I've just retagged this one as being a bug to represent that. The current formulation of the tags is not usable, so we should see about changing it to be a map like on other resources. (This will technically be a breaking change, but given that the current version is not actually usable -- since there's no way to actually select a single item -- I'd assume that currently usage of this attribute is pretty rare.) |
Thanks for the updates. |
Hi @dspatil, I'm afraid we're not able to commit to particular timelines since our development process is not schedule-driven. I've added the breaking-change label here, which will remind us next time we're planning a major release to take a look at this issue; we'd need to save it for a major release so we can warn users about the potential impact, even though it's small. We don't have any major releases of the AWS provider planned at this time, but when we do we'll look at all of the labels with this tag. If someone has the time and motivation to work on this, we'd be happy to review a PR for it, though as noted we'd need to delay merging it until we're preparing for the next major release. |
Hi folks, I agree on the This looks to impact every data sources as far as I see. It seems "easy" & "fast" to fix, but probably missing something for a first-sight check... ! 😅 |
@apparentlymart , |
@apparentlymart You were probably remembering about this one #853 |
@apparentlymart If I were to give this a shot (I've written another provider, so I think I'm comfortable enough). Would you be happy with me changing the |
Hey @drewsonne I threw a PR for that a week ago: #1706, which fixes multiple data sources. Tell me what you think on the PR :) |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @dspatil as hashicorp/terraform#15814. It was migrated here as a result of the provider split. The original body of the issue is below.
I want to get a 'value' of particular tag 'key' of aws resource. (say 'aws_ami')
Using the latest terraform version. (Terraform v0.10.0)
Here is data source.
Now, I am able to get all the tags associated with above resource as
"${data.aws_ami.web.tags}"
But, I want to get the 'value' of particular 'key' from that returned list. (say 'value' of key 'key1')
Is there a way to achieve this?
Below article explains some syntax. (like tags.#.key)
But its not working.
https://www.terraform.io/docs/providers/aws/d/ami.html#tags-key
Getting below error.
Failed to load root config module: Error loading modules: module compute: Error loading .terraform\modules\c46c475f0ca1e50cfe8501b3ff5285a6\compute.tf: Error reading config for output tags: parse error at 1:25: expected "}" but found invalid sequence "#"
Can anyone help me out?
The text was updated successfully, but these errors were encountered: