vault
No long description provided.
Installation
dagger install github.com/jumppad-labs/daggerverse/vault@4f140335b8c62d8e04a2fddcf559341d988b1832
Entrypoint
Return Type
Vault
Example
func (m *myModule) example() *Vault {
return dag.
Vault()
}
@function
def example() -> dag.Vault:
return (
dag.vault()
)
@func()
example(): Vault {
return dag
.vault()
}
Types
Vault 🔗
namespace() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Vault().
Namespace(ctx)
}
@function
async def example() -> str:
return await (
dag.vault()
.namespace()
)
@func()
async example(): Promise<string> {
return dag
.vault()
.namespace()
}
host() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Vault().
Host(ctx)
}
@function
async def example() -> str:
return await (
dag.vault()
.host()
)
@func()
async example(): Promise<string> {
return dag
.vault()
.host()
}
userpass() 🔗
Return Type
UserpassAuth !
Example
func (m *myModule) example() *VaultUserpassAuth {
return dag.
Vault().
Userpass()
}
@function
def example() -> dag.VaultUserpassAuth:
return (
dag.vault()
.userpass()
)
@func()
example(): VaultUserpassAuth {
return dag
.vault()
.userpass()
}
jwt() 🔗
Return Type
Jwtauth !
Example
func (m *myModule) example() *VaultJwtauth {
return dag.
Vault().
Jwt()
}
@function
def example() -> dag.VaultJwtauth:
return (
dag.vault()
.jwt()
)
@func()
example(): VaultJwtauth {
return dag
.vault()
.jwt()
}
withNamespace() 🔗
WithNamespace sets the namespace for the Vault client
Return Type
Vault !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
namespace | String ! | - | No description provided |
Example
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
Name | Type | Default Value | Description |
---|---|---|---|
host | String ! | - | No description provided |
Example
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
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | No description provided |
password | Secret ! | - | No description provided |
path | String | "userpass" | No description provided |
Example
func (m *myModule) example(username string, password *Secret) *Vault {
return dag.
Vault().
WithUserpassAuth(username, password)
}
@function
def example(username: str, password: dagger.Secret) -> dag.Vault:
return (
dag.vault()
.with_userpass_auth(username, password)
)
@func()
example(username: string, password: Secret): Vault {
return dag
.vault()
.withUserpassAuth(username, password)
}
withJwtauth() 🔗
Return Type
Vault !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
role | String ! | - | No description provided |
path | String | "jwt" | No description provided |
Example
func (m *myModule) example(token *Secret, role string) *Vault {
return dag.
Vault().
WithJwtauth(token, role)
}
@function
def example(token: dagger.Secret, role: str) -> dag.Vault:
return (
dag.vault()
.with_jwtauth(token, role)
)
@func()
example(token: Secret, role: string): Vault {
return dag
.vault()
.withJwtauth(token, role)
}
kvget() 🔗
GetSecretJSON returns a Vault secret as a JSON string
this method corresponds to the Vault CLI command vault kv get
Return Type
Secret !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
secret | String ! | - | No description provided |
Example
func (m *myModule) example(secret string) *Secret {
return dag.
Vault().
Kvget(secret)
}
@function
def example(secret: str) -> dagger.Secret:
return (
dag.vault()
.kvget(secret)
)
@func()
example(secret: string): Secret {
return dag
.vault()
.kvget(secret)
}
write() 🔗
Write writes a vault secret and returns the response as a JSON string
this method corresponds to the Vault CLI command vault write
optional params can be passed as a comma separated list of key=value pairs
Return Type
Secret !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
secret | String ! | - | No description provided |
params | String | - | No description provided |
Example
func (m *myModule) example(secret string) *Secret {
return dag.
Vault().
Write(secret)
}
@function
def example(secret: str) -> dagger.Secret:
return (
dag.vault()
.write(secret)
)
@func()
example(secret: string): Secret {
return dag
.vault()
.write(secret)
}
read() 🔗
Read returns a vault secret as a JSON string
this method corresponds to the Vault CLI command vault read
Return Type
Secret !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
secret | String ! | - | No description provided |
Example
func (m *myModule) example(secret string) *Secret {
return dag.
Vault().
Read(secret)
}
@function
def example(secret: str) -> dagger.Secret:
return (
dag.vault()
.read(secret)
)
@func()
example(secret: string): Secret {
return dag
.vault()
.read(secret)
}
testWrite() 🔗
TestWrite is a test function for the GetSecretJSON function example usage: dagger call test-write –host \({VAULT_ADDR} --namespace=\){VAULT_NAMESPACE} –username=VAULT_USER –password=VAULT_PASSWORD –secret=kubernetes/hashitalks/creds/deployer-default –params=“kubernetes_namespace=default”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
host | String ! | - | No description provided |
namespace | String ! | - | No description provided |
username | Secret ! | - | No description provided |
password | Secret ! | - | No description provided |
secret | String ! | - | No description provided |
params | String | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, host string, namespace string, username *Secret, password *Secret, secret string) string {
return dag.
Vault().
TestWrite(ctx, host, namespace, username, password, secret)
}
@function
async def example(host: str, namespace: str, username: dagger.Secret, password: dagger.Secret, secret: str) -> str:
return await (
dag.vault()
.test_write(host, namespace, username, password, secret)
)
@func()
async example(host: string, namespace: string, username: Secret, password: Secret, secret: string): Promise<string> {
return dag
.vault()
.testWrite(host, namespace, username, password, secret)
}
testRead() 🔗
TestRead is a test function for the GetSecretJSON function example usage: dagger call test-read –host \({VAULT_ADDR} --namespace=\){VAULT_NAMESPACE} –username=VAULT_USER –password=VAULT_PASSWORD –secret=kubernetes/hashitalks/creds/deployer-default –params=“kubernetes_namespace=default”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
host | String ! | - | No description provided |
namespace | String ! | - | No description provided |
username | Secret ! | - | No description provided |
password | Secret ! | - | No description provided |
secret | String ! | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, host string, namespace string, username *Secret, password *Secret, secret string) string {
return dag.
Vault().
TestRead(ctx, host, namespace, username, password, secret)
}
@function
async def example(host: str, namespace: str, username: dagger.Secret, password: dagger.Secret, secret: str) -> str:
return await (
dag.vault()
.test_read(host, namespace, username, password, secret)
)
@func()
async example(host: string, namespace: string, username: Secret, password: Secret, secret: string): Promise<string> {
return dag
.vault()
.testRead(host, namespace, username, password, secret)
}
testKvget() 🔗
TestKVGet is a test function for the GetSecretJSON function example usage: dagger call test-write –host \({VAULT_ADDR} --namespace=\){VAULT_NAMESPACE} –username=VAULT_USER –password=VAULT_PASSWORD –secret=secrets/hashitalks/creds/deployment
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
host | String ! | - | No description provided |
namespace | String ! | - | No description provided |
username | Secret ! | - | No description provided |
password | Secret ! | - | No description provided |
secret | String ! | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, host string, namespace string, username *Secret, password *Secret, secret string) string {
return dag.
Vault().
TestKvget(ctx, host, namespace, username, password, secret)
}
@function
async def example(host: str, namespace: str, username: dagger.Secret, password: dagger.Secret, secret: str) -> str:
return await (
dag.vault()
.test_kvget(host, namespace, username, password, secret)
)
@func()
async example(host: string, namespace: string, username: Secret, password: Secret, secret: string): Promise<string> {
return dag
.vault()
.testKvget(host, namespace, username, password, secret)
}
UserpassAuth 🔗
username() 🔗
Return Type
String !
Example
Function VaultUserpassAuth.username is not accessible from the vault module
Function VaultUserpassAuth.username is not accessible from the vault module
Function VaultUserpassAuth.username is not accessible from the vault module
password() 🔗
Return Type
String !
Example
Function VaultUserpassAuth.password is not accessible from the vault module
Function VaultUserpassAuth.password is not accessible from the vault module
Function VaultUserpassAuth.password is not accessible from the vault module
path() 🔗
Return Type
String !
Example
Function VaultUserpassAuth.path is not accessible from the vault module
Function VaultUserpassAuth.path is not accessible from the vault module
Function VaultUserpassAuth.path is not accessible from the vault module
Jwtauth 🔗
token() 🔗
Return Type
String !
Example
Function VaultJwtauth.token is not accessible from the vault module
Function VaultJwtauth.token is not accessible from the vault module
Function VaultJwtauth.token is not accessible from the vault module
role() 🔗
Return Type
String !
Example
Function VaultJwtauth.role is not accessible from the vault module
Function VaultJwtauth.role is not accessible from the vault module
Function VaultJwtauth.role is not accessible from the vault module
path() 🔗
Return Type
String !
Example
Function VaultJwtauth.path is not accessible from the vault module
Function VaultJwtauth.path is not accessible from the vault module
Function VaultJwtauth.path is not accessible from the vault module