Custom blocks

You can implement your own blocks and use them by pointing Digger to a Git repo in config.json

Jinja syntax is supported for Terraform rendering within a block.

This part is particularly under-documented. The best way to figure it out in the meantime is to read the code of the 2 repos above.

We'd like this to evolve into a proper open-source plugin ecosystem. For now though we are just figuring out the basics; the APIs will likely to change.

TODO: versioning. Either commit hash links, or version tags, or use existing registry somehow (eg npm / pip), or make our own registry. Ideally there also should be a way to automatically mirror versions from Hashicorp module registry because in many cases blocks correspond to modules.

TODO: clear block API. At the moment it's "clone and figure it out" but we should have a clear API for block developers, interfaces to implement, helpers etc.

TODO: how does a block "declare" its type so that mismatch can be caught at generate time?

TODO: multi-cloud implementation. Is it separate directories? Or some kind of a manifest file with supported platforms in the block?

Last updated