Returning Complex Objects from Terraform External Data Sources
Terraform’s external data source is a useful escape hatch when you need to call out to a script to fetch data that isn’t available via a provider. However, it comes with a sharp edge that often catches people out: Terraform expects the result to be a flat map of string → string values. If your script returns a nested object, Terraform will fail with a fairly unhelpful error message. In this…












