vault
HashiCorp Vault — currently focused on attaching AppRole environmentvariables to a container so downstream tools (vals, ansible playbooks, …)
can authenticate. The intent is to keep a single canonical place for
Vault-related plumbing rather than reimplementing the same env-var dance
in every consumer module.
Installation
dagger install github.com/stuttgart-things/dagger/vault@v0.121.0Entrypoint
Return Type
Vault Example
dagger -m github.com/stuttgart-things/dagger/vault@ed4e8057783a0a4c9a5f5cdd2253f5773487cc80 call \
func (m *MyModule) Example() *dagger.Vault {
return dag.
Vault()
}@function
def example() -> dagger.Vault:
return (
dag.vault()
)@func()
example(): Vault {
return dag
.vault()
}Types
Vault 🔗
withAppRoleEnv() 🔗
WithAppRoleEnv returns the given container with Vault AppRole environment
variables (VAULT_ROLE_ID, VAULT_SECRET_ID, VAULT_ADDR) set as masked
secrets. Any nil argument is skipped — pass only what the downstream tool
needs. The container itself does no Vault login; this is plumbing for
tools like vals and ansible playbooks that read these envs.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
| roleId | Secret | - | No description provided |
| secretId | Secret | - | No description provided |
| addr | Secret | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/vault@ed4e8057783a0a4c9a5f5cdd2253f5773487cc80 call \
with-app-role-env --ctr IMAGE:TAGfunc (m *MyModule) Example(ctr *dagger.Container) *dagger.Container {
return dag.
Vault().
Withapproleenv(ctr)
}@function
def example(ctr: dagger.Container) -> dagger.Container:
return (
dag.vault()
.withapproleenv(ctr)
)@func()
example(ctr: Container): Container {
return dag
.vault()
.withAppRoleEnv(ctr)
}