An open API service indexing awesome lists of open source software.

https://github.com/koki-develop/terraform-provider-js

The Next Generation AltJS
https://github.com/koki-develop/terraform-provider-js

Last synced: 10 months ago
JSON representation

The Next Generation AltJS

Awesome Lists containing this project

README

          


JS.tf




JavaScript × Terraform



The Next Generation AltJS.


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

```hcl
data "js_function_call" "hello_world" {
caller = "console"
function = "log"
args = ["hello world"]
}

data "js_program" "main" {
contents = [data.js_function_call.hello_world.content]
}

resource "local_file" "main" {
filename = "index.js"
content = data.js_program.main.content
}
```

```console
$ 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.

```hcl
terraform {
required_providers {
js = {
source = "koki-develop/js"
}
}
}

provider "js" {}
```

Next, run `terraform init`.

```console
$ terraform init
```

That's it. You are ready to use JS.tf.

# Examples

- [`examples/`](./examples)

# Documentation

- [Terraform Registry](https://registry.terraform.io/providers/koki-develop/js/latest/docs)

# LICENSE

[MIT](./LICENSE)