Dagger
Search

vault

No long description provided.

Installation

dagger install github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5

Entrypoint

Return Type
Vault
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 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 🔗

withNamespace() 🔗

WithNamespace sets the namespace for the Vault client

Return Type
Vault !
Arguments
NameTypeDefault ValueDescription
namespaceString !-No description provided
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 call \
 with-namespace --namespace string
func (m *myModule) example(namespace string) *Vault  {
	return dag.
			Vault().
			WithNamespace(namespace)
}
@function
def example(namespace: str) -> dag.Vault:
	return (
		dag.vault()
		.with_namespace(namespace)
	)
@func()
example(namespace: string): Vault {
	return dag
		.vault()
		.withNamespace(namespace)
}

withHost() 🔗

WithHost sets the host for the Vault client

Return Type
Vault !
Arguments
NameTypeDefault ValueDescription
hostString !-No description provided
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 call \
 with-host --host string
func (m *myModule) example(host string) *Vault  {
	return dag.
			Vault().
			WithHost(host)
}
@function
def example(host: str) -> dag.Vault:
	return (
		dag.vault()
		.with_host(host)
	)
@func()
example(host: string): Vault {
	return dag
		.vault()
		.withHost(host)
}

withUserpassAuth() 🔗

WithUserpassAuth sets the userpass autrhentication for the Vault client

Return Type
Vault !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordString !-No description provided
pathString "userpass"No description provided
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 call \
 with-userpass-auth --username string --password string
func (m *myModule) example(username string, password string) *Vault  {
	return dag.
			Vault().
			WithUserpassAuth(username, password)
}
@function
def example(username: str, password: str) -> dag.Vault:
	return (
		dag.vault()
		.with_userpass_auth(username, password)
	)
@func()
example(username: string, password: string): Vault {
	return dag
		.vault()
		.withUserpassAuth(username, password)
}

getSecretJson() 🔗

GetSecretJSON returns a vault secret as a JSON string

Return Type
String !
Arguments
NameTypeDefault ValueDescription
secretString !-No description provided
paramsString -No description provided
operationTypeString "read"No description provided
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 call \
 get-secret-json --secret string
func (m *myModule) example(ctx context.Context, secret string) string  {
	return dag.
			Vault().
			GetSecretJson(ctx, secret)
}
@function
async def example(secret: str) -> str:
	return await (
		dag.vault()
		.get_secret_json(secret)
	)
@func()
async example(secret: string): Promise<string> {
	return dag
		.vault()
		.getSecretJson(secret)
}

testGetSecret() 🔗

TestGetSecret is a test function for the GetSecretJSON function example usage: dagger call test-get-secret –host \({VAULT_ADDR} --namespace=\){VAULT_NAMESPACE} –username=VAULT_USER –password=VAULT_PASSWORD –secret=kubernetes/hashitalks/creds/deployer-default –params=“kubernetes_namespace=default” –op-type=write

Return Type
String !
Arguments
NameTypeDefault ValueDescription
hostString !-No description provided
namespaceString !-No description provided
usernameSecret !-No description provided
passwordSecret !-No description provided
secretString !-No description provided
paramsString !-No description provided
opTypeString !-No description provided
Example
dagger -m github.com/nicholasjackson/demo-dagger-vault/dagger/modules/vault@2074b3a0a308ebf8d6d7de45f43719531afb6ff5 call \
 test-get-secret --host string --namespace string --username env:MYSECRET --password env:MYSECRET --secret string --params string --op-type string
func (m *myModule) example(ctx context.Context, host string, namespace string, username *Secret, password *Secret, secret string, params string, opType string) string  {
	return dag.
			Vault().
			TestGetSecret(ctx, host, namespace, username, password, secret, params, opType)
}
@function
async def example(host: str, namespace: str, username: dagger.Secret, password: dagger.Secret, secret: str, params: str, op_type: str) -> str:
	return await (
		dag.vault()
		.test_get_secret(host, namespace, username, password, secret, params, op_type)
	)
@func()
async example(host: string, namespace: string, username: Secret, password: Secret, secret: string, params: string, opType: string): Promise<string> {
	return dag
		.vault()
		.testGetSecret(host, namespace, username, password, secret, params, opType)
}