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
- Host: GitHub
- URL: https://github.com/koki-develop/terraform-provider-js
- Owner: koki-develop
- License: mit
- Created: 2024-07-13T00:31:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T00:31:01.000Z (11 months ago)
- Last Synced: 2025-03-23T03:41:34.692Z (11 months ago)
- Language: Go
- Homepage: https://registry.terraform.io/providers/koki-develop/js/latest/docs
- Size: 273 KB
- Stars: 18
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JS.tf
JavaScript × Terraform
The Next Generation AltJS.
```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)