Dagger
Search

terragrunt

Provides a single flexible `run` function that executes any terragrunt command
in the configured container with SSH agent forwarding and environment variable support.

Example usage:
dagger call run --source=. --stack-dir=staging/my-stack --ssh-socket=/run/user/1000/ssh-agent.socket --command="stack run plan"
dagger call run --source=. --stack-dir=staging/my-stack --ssh-socket=/run/user/1000/ssh-agent.socket --command="stack run apply --non-interactive"

Installation

dagger install gitlab.com/abes140377/daggerverse/terragrunt@c2d3efa7674333a7d1f1d92406e691f4cc32f24f

Entrypoint

Return Type
Terragrunt
Example
dagger -m gitlab.com/abes140377/daggerverse/terragrunt@c2d3efa7674333a7d1f1d92406e691f4cc32f24f call \
func (m *MyModule) Example() *dagger.Terragrunt  {
	return dag.
			Terragrunt()
}
@function
def example() -> dagger.Terragrunt:
	return (
		dag.terragrunt()
	)
@func()
example(): Terragrunt {
	return dag
		.terragrunt()
}

Types

Terragrunt 🔗

run() 🔗

Runs an arbitrary terragrunt command in the given directory.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-- The repository root directory to mount into the container
stackDirString !-- Relative path to the working directory (e.g. "staging/proxmox-k3s-vms")
sshSocketSocket !-- SSH agent socket for git authentication
commandString !-- The terragrunt command to run (e.g. "stack run plan", "stack run apply --non-interactive")
envVars[String ! ] -- Environment variables as KEY=VALUE strings (e.g. "AWS_ACCESS_KEY_ID=abc")
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, stackDir string, sshSocket *dagger.Socket, command string) string  {
	return dag.
			Terragrunt().
			Run(ctx, source, stackDir, sshSocket, command)
}
@function
async def example(source: dagger.Directory, stack_dir: str, ssh_socket: dagger.Socket, command: str) -> str:
	return await (
		dag.terragrunt()
		.run(source, stack_dir, ssh_socket, command)
	)
@func()
async example(source: Directory, stackDir: string, sshSocket: Socket, command: string): Promise<string> {
	return dag
		.terragrunt()
		.run(source, stackDir, sshSocket, command)
}