Can't use tags
attribute data sources
#853
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
tags
attribute data sources
#853
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: