-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Can't use tags
attribute data sources
#853
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
Comments
radeksimko
added
the
enhancement
Requests to existing resources that expand the functionality or scope.
label
Jun 16, 2017
Hey @artburkart I think this is something we can do by updating the code & adding a schema migration. Will check how we can do that soon :) |
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! |
ghost
locked and limited conversation to collaborators
Apr 10, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
I guess I should mention it might be a problem across providers depending on whether other providers use similar tag implementations.
Terraform Configuration Files
I've made a gist with a README here: https://gist.github.com/artburkart/5916ea45390bf2050e1f97f15c9a7dcd
I'll also paste my configs here:
Debug Output
I'll provide some upon request, but I think the snippet I provided should be sufficient for reproduction and the output isn't too helpful, since there aren't any API issues here.
Expected Behavior
I should be able to write this:
Actual Behavior
Because the tags on the data source are interpreted as a list of maps, they're not compatible with the
tags
attribute as defined.Steps to Reproduce
terraform plan
Important Factoids
Nothing atypical about setup. It's not an AWS account-related conundrum. One thing worth noting is that no matter how I try accessing the values of the tags in the
data.aws_instance.dummy.tags
field, I get the length of the list back.For example:
I think this has something to do with terraform not unpacking the value correctly when creating the data source, so it ends up not being compatible with the
aws_instance
resource because terraform doesn't play nicely with lists of maps.I don't know
go
very well, but I think this problem might have something to do with terraform converting a set of hashes to a list of hashes in this file: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/data_source_aws_common_schema.go#L21-L33References
I was told to open this issue here: hashicorp/terraform#2042 (comment)
The text was updated successfully, but these errors were encountered: