JS.tf
JavaScript × Terraform
The Next Generation AltJS.
data "js_function_call" "hello_world" {
caller = "console"
function = "log"
args = ["hello world"]
}
data "js_program" "main" {
statements = [data.js_function_call.hello_world.statement]
}
resource "local_file" "main" {
filename = "index.js"
content = data.js_program.main.content
}
$ terraform init
$ terraform apply
$ node index.js
hello world
Getting Started
JS.tf is a Terraform provider that allows you to write JavaScript code in Terraform configuration files.
To use it, add the following provider configuration.
terraform {
required_providers {
js = {
source = "koki-develop/js"
}
}
}
provider "js" {}
Next, run terraform init
.
$ terraform init
That's it. You are ready to use JS.tf.
Examples
Documentation
LICENSE
MIT