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@a065e2ee8f7dfb501d1b6f9b921e0aef148b46fa

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@a065e2ee8f7dfb501d1b6f9b921e0aef148b46fa 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@a065e2ee8f7dfb501d1b6f9b921e0aef148b46fa 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@a065e2ee8f7dfb501d1b6f9b921e0aef148b46fa 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)
}