Dagger
Search

opentofu

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/riftonix/daggerverse/modules/opentofu@d3a9795669a5f2e076a81b7f57b30d63bd1e405d

Entrypoint

Return Type
Opentofu !
Arguments
NameTypeDefault ValueDescription
containerImageString "ghcr.io/opentofu/opentofu:latest"TF container image
executorString !"tofu"Choice of IaC executor
Example
dagger -m github.com/riftonix/daggerverse/modules/opentofu@d3a9795669a5f2e076a81b7f57b30d63bd1e405d call \
 --executor string
func (m *MyModule) Example(executor string) *dagger.Opentofu  {
	return dag.
			Opentofu(executor)
}
@function
def example(executor: str) -> dagger.Opentofu:
	return (
		dag.opentofu(executor)
	)
@func()
example(executor: string): Opentofu {
	return dag
		.opentofu(executor)
}

Types

Opentofu 🔗

container() 🔗

Returns container

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/modules/opentofu@d3a9795669a5f2e076a81b7f57b30d63bd1e405d call \
 --executor string container
func (m *MyModule) Example(executor string) *dagger.Container  {
	return dag.
			Opentofu(executor).
			Container()
}
@function
def example(executor: str) -> dagger.Container:
	return (
		dag.opentofu(executor)
		.container()
	)
@func()
example(executor: string): Container {
	return dag
		.opentofu(executor)
		.container()
}

lint() 🔗

Verify that the manifests is well-formed

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-IaC project path
Example
dagger -m github.com/riftonix/daggerverse/modules/opentofu@d3a9795669a5f2e076a81b7f57b30d63bd1e405d call \
 --executor string lint --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, executor string, source *dagger.Directory) string  {
	return dag.
			Opentofu(executor).
			Lint(ctx, source)
}
@function
async def example(executor: str, source: dagger.Directory) -> str:
	return await (
		dag.opentofu(executor)
		.lint(source)
	)
@func()
async example(executor: string, source: Directory): Promise<string> {
	return dag
		.opentofu(executor)
		.lint(source)
}