Skip to content

each reference crashes in provisioner block #22289

@pselle

Description

@pselle

Terraform Version

0.12.6

Terraform Configuration Files

resource "null_resource" "test_foreach" {
  for_each = {
    key1 = "value1"
    key2 = "value2"
  }
  
  provisioner "local-exec" {
    command = "echo ${each.key} - ${each.value}"
  }
}

Debug Output

Crash Output

https://gist.github.com/pselle/e3ed20b30e7daf48cb58e04f8d7fd310

Expected Behavior

Should not have crashed -- echo should have run successfully

Actual Behavior

Crash

Steps to Reproduce

  1. terraform init
  2. terraform apply

Additional Context

References

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions