Skip to content

string literal "false" evaluates to "0" using null_data_source #13512

@in4mer

Description

@in4mer

Terraform Version

0.9.2

Affected Resource(s)

Please list the resources as a list, for example:

  • core

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

variable "map1" {
  default = {
    key = "whatever"
  }
}
variable "map2" {
  default = {
    key = "false"
  }
}

variable "key" { default = "key" }
data "null_data_source" "wtf" {
  inputs = "${zipmap(split(",", lookup(var.map1, var.key)), split(",", lookup(var.map2, var.key)))}"
}

output "output" {
  value = "${zipmap(split(",", lookup(var.map1, var.key)), split(",", lookup(var.map2, var.key)))}"
}

output "same_output_from_nds" {
  value = "${data.null_data_source.wtf.inputs}"
}

Debug Output

Not even going to bother

Panic Output

The only panic this should elicit is entirely existential

Expected Behavior

The string literal "false" should not be evaluated

Actual Behavior

I don't even...

data.null_data_source.wtf: Refreshing state...

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

output = {
  whatever = false
}
same_output_from_nds = {
  whatever = 0
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Is no one else actually using null_data_source? This is really, really frustrating.

References

Possibly ??

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions