terraform-provider-js

command module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal