Trying to find a workaround for #8153 I attempted to use null_data_source. This worked fine for a map of strings, but doesn't work for a map of lists. Since there is no documentation on null_data_source this might be a feature not a bug (though the lack of documentation is a bug :) )
Terraform v0.7.0
data "null_data_source" "testmapds" {
inputs = {
key1 = ["value11", "value12"]
key2 = ["value21", "value22"]
}
}
A map of lists
Error refreshing state: 1 error(s) occurred:
* inputs: 2 error(s) decoding:
* '[key1]' expected type 'string', got unconvertible type '[]interface {}'
* '[key2]' expected type 'string', got unconvertible type '[]interface {}'
Please list the steps required to reproduce the issue, for example:
terraform applyHi @WolverineFan! Thanks for opening an issue. This isn't possible right now because of limitations in HCL and the helper/schema interface. null_data_source was never really intended for public use (according to @apparentlymart, it's author!). I don't have a timescale for when we can fix this, unfortunately.
Thanks for the feedback. Now that I have a valid workaround for output maps https://github.com/hashicorp/terraform/issues/8153#issuecomment-239548132 I'm good. If anyone needs it, I suspect that same workaround would work fine for null_data_source as well (though I haven't tested it).
Since this was just in service of a workaround anyway, I'm going to close this out now. The new features coming in Terraform v0.12.0 will hopefully take care of any remaining use-cases that might've caused use of null_data_source as a workaround. If not, please let us know in a new issue!