Dagger
Search

vault

A utility module for working with secrets in HashiCorp Vault

Installation

dagger install github.com/kpenfound/dagger-modules/vault@v0.0.11

Entrypoint

Return Type
Vault
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
func (m *myModule) example() *Vault  {
	return dag.
			Vault()
}
@function
def example() -> dag.Vault:
	return (
		dag.vault()
	)
@func()
example(): Vault {
	return dag
		.vault()
}

Types

Vault 🔗

approleId() 🔗

Return Type
String !
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 approle-id
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Vault().
			ApproleId(ctx)
}
@function
async def example() -> str:
	return await (
		dag.vault()
		.approle_id()
	)
@func()
async example(): Promise<string> {
	return dag
		.vault()
		.approleId()
}

approleSecret() 🔗

Return Type
String !
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 approle-secret
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Vault().
			ApproleSecret(ctx)
}
@function
async def example() -> str:
	return await (
		dag.vault()
		.approle_secret()
	)
@func()
async example(): Promise<string> {
	return dag
		.vault()
		.approleSecret()
}

address() 🔗

Return Type
String !
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 address
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Vault().
			Address(ctx)
}
@function
async def example() -> str:
	return await (
		dag.vault()
		.address()
	)
@func()
async example(): Promise<string> {
	return dag
		.vault()
		.address()
}

auth() 🔗

Authenticate to Vault with an approle secret

Return Type
Vault !
Arguments
NameTypeDefault ValueDescription
approleIdString !-No description provided
approleSecretString !-No description provided
addressString !-No description provided
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 auth --approle-id string --approle-secret string --address string
func (m *myModule) example(approleId string, approleSecret string, address string) *Vault  {
	return dag.
			Vault().
			Auth(approleId, approleSecret, address)
}
@function
def example(approle_id: str, approle_secret: str, address: str) -> dag.Vault:
	return (
		dag.vault()
		.auth(approle_id, approle_secret, address)
	)
@func()
example(approleId: string, approleSecret: string, address: string): Vault {
	return dag
		.vault()
		.auth(approleId, approleSecret, address)
}

getSecret() 🔗

Get a secret from Vault

Return Type
Secret !
Arguments
NameTypeDefault ValueDescription
secretString !-No description provided
keyString !-No description provided
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 get-secret --secret string --key string
func (m *myModule) example(secret string, key string) *Secret  {
	return dag.
			Vault().
			GetSecret(secret, key)
}
@function
def example(secret: str, key: str) -> dagger.Secret:
	return (
		dag.vault()
		.get_secret(secret, key)
	)
@func()
example(secret: string, key: string): Secret {
	return dag
		.vault()
		.getSecret(secret, key)
}

putSecret() 🔗

Put a secret in Vault

Return Type
Vault !
Arguments
NameTypeDefault ValueDescription
secretString !-No description provided
keyString !-No description provided
valueString !-No description provided
Example
dagger -m github.com/kpenfound/dagger-modules/vault@4c9d04b461f9e0fce3ff40399570f635f586d972 call \
 put-secret --secret string --key string --value string
func (m *myModule) example(secret string, key string, value string) *Vault  {
	return dag.
			Vault().
			PutSecret(secret, key, value)
}
@function
def example(secret: str, key: str, value: str) -> dag.Vault:
	return (
		dag.vault()
		.put_secret(secret, key, value)
	)
@func()
example(secret: string, key: string, value: string): Vault {
	return dag
		.vault()
		.putSecret(secret, key, value)
}