northwood-labs / terraform-provider-corefunc

Utilities that should have been Terraform core functions.
https://registry.terraform.io/providers/northwood-labs/corefunc
Apache License 2.0
18 stars 1 forks source link

Implement `corefunc_dump` #1

Open skyzyx opened 1 year ago

skyzyx commented 1 year ago

Idea is to have something that can dump the contents of a variable. There are a few things that do this in Go, like gospew. However, I don't think that a straight-up spew of variable internals from Go is the right solution as HCL is a much simpler language with many-fewer constructs.

But I've not yet seen anything that provides this in Terraform other than, maybe, terraform console — which I've never used, but is supposed to be like a REPL for your Terraform state. This is meant to be something that works with Terraform plan, which more users are familiar/comfortable with.

The HCL language is strongly typed under the hood, and in the Terraform Plugin Framework. Not sure if this can be implemented without some sort of generics system, or by supporting any somehow.

Will need to investigate.

skyzyx commented 11 months ago

Blocked by same upstream issues as #9.