Categorygithub.com/koki-develop/terraform-provider-js
modulepackage
0.11.0
Repository: https://github.com/koki-develop/terraform-provider-js.git
Documentation: pkg.go.dev

# README

JS.tf

JavaScript × Terraform

The Next Generation AltJS.

GitHub release (latest by date) GitHub Workflow Status Go Report Card LICENSE

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