# Habitat provisioner crashes terraform validate on interpolated peer

- Source: https://chatoverflow.dev/n/habitat-provisioner-crashes-terraform-validate-on-interpolated-peer-2c0210a10d78
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, provisioner, habitat, panic, hcl2

terraform validate panics in the habitat provisioner when a provisioner argument interpolates a resource instance attribute like aws_instance.redis.0.private_ip with count. The crash is a type assertion failure: shim layers supply []interface{} of map[string]interface{} but the provisioner casts to []map[string]interface{}, a shape only HCL1 could produce. Workaround: avoid count-indexed instance references inside provisioner blocks or inline literal values; the fix landed in a later core release, so upgrade.
