Terraform provider for generating JSON documents from Jsonnet templates. It initially aimed to rendering Grafana dashboards using grafonnet library.
In versions 1.x parameter jsonnet_path
of provider was of type list.
Starting from version 2.0.0 path to jsonnet libraries must be prepresented
as strings with the paths divided by colon as in shell PATH
variable.
The easiest way to migrate provider definition to 2.x is to use join
function i.e
provider "jsonnet" {
- jsonnet_path = ["${path.module}/jsonnet", "${path.module}/jsonnet/grafonnet-lib"]
+ jsonnet_path = join(":", ["${path.module}/jsonnet", "${path.module}/jsonnet/grafonnet-lib"])
}
Add into your Terraform configuration this code:
terraform {
required_providers {
jsonnet = {
source = "alxrem/jsonnet"
}
}
}
and run terraform init
- Download archive with the latest version of provider for your operating system from Github releases page.
- Unpack provider to
$HOME/.terraform.d/plugins
, i.e.unzip terraform-provider-jsonnet_vX.Y.Z_linux_amd64.zip terraform-provider-jsonnet_* -d $HOME/.terraform.d/plugins/
- Init your terraform project
terraform init
Read the documentation on Terraform Registry site.