Dagger
Search

localstack-dagger-module

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/localstack/localstack-dagger-module@1731c988c4fcbeadb0fa28ab41f2183e08d60a2a

Entrypoint

Return Type
LocalstackDaggerModule !
Example
dagger -m github.com/localstack/localstack-dagger-module@1731c988c4fcbeadb0fa28ab41f2183e08d60a2a call \
func (m *myModule) example() *dagger.LocalstackDaggerModule  {
	return dag.
			LocalstackDaggerModule()
}
@function
def example() -> dagger.LocalstackDaggerModule:
	return (
		dag.localstack_dagger_module()
	)
@func()
example(): LocalstackDaggerModule {
	return dag
		.localstackDaggerModule()
}

Types

LocalstackDaggerModule 🔗

ephemeral() 🔗

Manage ephemeral LocalStack instances in the cloud.

Args: auth_token: LocalStack auth token (required) operation: Operation to perform (create, list, delete, logs) name: Name of the ephemeral instance (required for create, delete, logs) lifetime: Lifetime of the instance in minutes (optional, default: 60) auto_load_pod: Auto load pod configuration (optional) extension_auto_install: Extension auto install configuration (optional)

Returns: Response from the API operation

Return Type
String !
Arguments
NameTypeDefault ValueDescription
authTokenSecret !-A reference to a secret value, which can be handled more safely than the value itself.
operationString !-No description provided
nameString nullNo description provided
lifetimeInteger nullNo description provided
autoLoadPodString nullNo description provided
extensionAutoInstallString nullNo description provided
Example
dagger -m github.com/localstack/localstack-dagger-module@1731c988c4fcbeadb0fa28ab41f2183e08d60a2a call \
 ephemeral --auth-token env:MYSECRET --operation string
func (m *myModule) example(ctx context.Context, authToken *dagger.Secret, operation string) string  {
	return dag.
			LocalstackDaggerModule().
			Ephemeral(ctx, authToken, operation)
}
@function
async def example(auth_token: dagger.Secret, operation: str) -> str:
	return await (
		dag.localstack_dagger_module()
		.ephemeral(auth_token, operation)
	)
@func()
async example(authToken: Secret, operation: string): Promise<string> {
	return dag
		.localstackDaggerModule()
		.ephemeral(authToken, operation)
}

start() 🔗

Start a LocalStack service with appropriate configuration.

If image_name is provided, starts that specific image. If auth_token is provided but no image_name, starts LocalStack Pro edition. Otherwise starts LocalStack Community edition.

Args: auth_token: Optional secret containing LocalStack Pro auth token configuration: Optional string of configuration variables in format “KEY1=value1,KEY2=value2” Example: “DEBUG=1,LS_LOG=trace” docker_sock: Optional Docker socket for container interactions image_name: Optional custom LocalStack image name to use

Returns: A running LocalStack service container

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
authTokenSecret nullNo description provided
configurationString nullNo description provided
dockerSockSocket nullNo description provided
imageNameString nullNo description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example() *dagger.Service  {
	return dag.
			LocalstackDaggerModule().
			Start()
}
@function
def example() -> dagger.Service:
	return (
		dag.localstack_dagger_module()
		.start()
	)
@func()
example(): Service {
	return dag
		.localstackDaggerModule()
		.start()
}

state() 🔗

Load, save, or reset LocalStack state.

Args: auth_token: Secret containing LocalStack auth token (required for save/load) load: Name of the Cloud Pod to load save: Name of the Cloud Pod to save reset: Reset the LocalStack state endpoint: LocalStack endpoint to use (optional, defaults to host.docker.internal:4566) Returns: Output from the pod operation or error message if LocalStack is not running

Return Type
String !
Arguments
NameTypeDefault ValueDescription
authTokenSecret nullNo description provided
loadString nullNo description provided
saveString nullNo description provided
endpointString nullNo description provided
resetBoolean !falseNo description provided
Example
dagger -m github.com/localstack/localstack-dagger-module@1731c988c4fcbeadb0fa28ab41f2183e08d60a2a call \
 state --reset boolean
func (m *myModule) example(ctx context.Context, reset bool) string  {
	return dag.
			LocalstackDaggerModule().
			State(ctxreset)
}
@function
async def example(reset: bool) -> str:
	return await (
		dag.localstack_dagger_module()
		.state(reset)
	)
@func()
async example(reset: boolean): Promise<string> {
	return dag
		.localstackDaggerModule()
		.state(reset)
}