terraform-provider-lua

command module
v0.0.0-...-df53803 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MPL-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

terraform-provider-lua

This is an experimental OpenTofu and Terraform function provider based on terraform-plugin-go.

It provides an "exec" function which takes a lua program as the first parameter and passes all additional parameters to the function defined in the lua file.

locals {
    lua_echo = <<EOT

function echo( input )
    return input
end

return echo

EOT
}

output "example" {
    value = provider::lua::exec(local.lua_echo, {"foo": {"bar": 42}})
}

In OpenTofu 1.7.0-beta1 you may configure the provider and pass it a lua library to load. Any functions exposed in this library will be available as functions within the tofu configuration. This feature is an experimental preview and is subject to change before the OpenTofu 1.7.0 release.

provider "lua" {
    lua = file("./lib.lua")
}

output "example" {
    value = provider::lua::echo({"message": "Hello Functions!"})
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL