Dagger
Search

secret-manager

Allow to create or read secret from GCP secret manager

Installation

dagger install github.com/Dudesons/daggerverse/secret-manager@v0.3.0

Entrypoint

Return Type
SecretManager
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
func (m *myModule) example() *SecretManager  {
	return dag.
			SecretManager()
}
@function
def example() -> dag.SecretManager:
	return (
		dag.secret_manager()
	)
@func()
example(): SecretManager {
	return dag
		.secretManager()
}

Types

SecretManager 🔗

gcp() 🔗

Return Type
SecretManagerGcpSecretManager !
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 gcp
func (m *myModule) example() *SecretManagerGcpSecretManager  {
	return dag.
			SecretManager().
			Gcp()
}
@function
def example() -> dag.SecretManagerGcpSecretManager:
	return (
		dag.secret_manager()
		.gcp()
	)
@func()
example(): SecretManagerGcpSecretManager {
	return dag
		.secretManager()
		.gcp()
}

aws() 🔗

Return Type
SecretManagerAwsSecretManager !
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws
func (m *myModule) example() *SecretManagerAwsSecretManager  {
	return dag.
			SecretManager().
			Aws()
}
@function
def example() -> dag.SecretManagerAwsSecretManager:
	return (
		dag.secret_manager()
		.aws()
	)
@func()
example(): SecretManagerAwsSecretManager {
	return dag
		.secretManager()
		.aws()
}

SecretManagerGcpSecretManager 🔗

getSecret() 🔗

Read a secret from secret manager

Return Type
Secret !
Arguments
NameTypeDefault ValueDescription
nameString !-The secret name to read
projectString !-The GCP project where the secret is stored
versionString "latest"The version of the secret to read
filePathFile -The path to a credentials json file
gcloudFolderDirectory -The path to the gcloud folder
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 gcp \
 get-secret --name string --project string
func (m *myModule) example(name string, project string) *Secret  {
	return dag.
			SecretManager().
			Gcp().
			GetSecret(name, project)
}
@function
def example(name: str, project: str) -> dagger.Secret:
	return (
		dag.secret_manager()
		.gcp()
		.get_secret(name, project)
	)
@func()
example(name: string, project: string): Secret {
	return dag
		.secretManager()
		.gcp()
		.getSecret(name, project)
}

setSecret() 🔗

Create or update a secret value

Return Type
String !
Arguments
NameTypeDefault ValueDescription
nameString !-The secret name to read
valueString !-The value to set to the secret
projectString !-The GCP project where the secret is stored
filePathFile -The path to a credentials json file
gcloudFolderDirectory -The path to the gcloud folder
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 gcp \
 set-secret --name string --value string --project string
func (m *myModule) example(ctx context.Context, name string, value string, project string) string  {
	return dag.
			SecretManager().
			Gcp().
			SetSecret(ctx, name, value, project)
}
@function
async def example(name: str, value: str, project: str) -> str:
	return await (
		dag.secret_manager()
		.gcp()
		.set_secret(name, value, project)
	)
@func()
async example(name: string, value: string, project: string): Promise<string> {
	return dag
		.secretManager()
		.gcp()
		.setSecret(name, value, project)
}

SecretManagerAwsSecretManager 🔗

withCredentialsKeys() 🔗

Authenticate to AWS using access and secret key

Return Type
SecretManagerAwsSecretManager !
Arguments
NameTypeDefault ValueDescription
accessKeyString !-No description provided
secretKeyString !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 with-credentials-keys --access-key string --secret-key string
func (m *myModule) example(accessKey string, secretKey string) *SecretManagerAwsSecretManager  {
	return dag.
			SecretManager().
			Aws().
			WithCredentialsKeys(accessKey, secretKey)
}
@function
def example(access_key: str, secret_key: str) -> dag.SecretManagerAwsSecretManager:
	return (
		dag.secret_manager()
		.aws()
		.with_credentials_keys(access_key, secret_key)
	)
@func()
example(accessKey: string, secretKey: string): SecretManagerAwsSecretManager {
	return dag
		.secretManager()
		.aws()
		.withCredentialsKeys(accessKey, secretKey)
}

withCredentialsFolder() 🔗

Authenticate to AWS using .aws folder

Return Type
SecretManagerAwsSecretManager !
Arguments
NameTypeDefault ValueDescription
awsFolderDirectory !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 with-credentials-folder --aws-folder DIR_PATH
func (m *myModule) example(awsFolder *Directory) *SecretManagerAwsSecretManager  {
	return dag.
			SecretManager().
			Aws().
			WithCredentialsFolder(awsFolder)
}
@function
def example(aws_folder: dagger.Directory) -> dag.SecretManagerAwsSecretManager:
	return (
		dag.secret_manager()
		.aws()
		.with_credentials_folder(aws_folder)
	)
@func()
example(awsFolder: Directory): SecretManagerAwsSecretManager {
	return dag
		.secretManager()
		.aws()
		.withCredentialsFolder(awsFolder)
}

withRegion() 🔗

Authenticate to AWS using access and secret key

Return Type
SecretManagerAwsSecretManager !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 with-region --name string
func (m *myModule) example(name string) *SecretManagerAwsSecretManager  {
	return dag.
			SecretManager().
			Aws().
			WithRegion(name)
}
@function
def example(name: str) -> dag.SecretManagerAwsSecretManager:
	return (
		dag.secret_manager()
		.aws()
		.with_region(name)
	)
@func()
example(name: string): SecretManagerAwsSecretManager {
	return dag
		.secretManager()
		.aws()
		.withRegion(name)
}

withProfile() 🔗

Return Type
SecretManagerAwsSecretManager !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 with-profile --name string
func (m *myModule) example(name string) *SecretManagerAwsSecretManager  {
	return dag.
			SecretManager().
			Aws().
			WithProfile(name)
}
@function
def example(name: str) -> dag.SecretManagerAwsSecretManager:
	return (
		dag.secret_manager()
		.aws()
		.with_profile(name)
	)
@func()
example(name: string): SecretManagerAwsSecretManager {
	return dag
		.secretManager()
		.aws()
		.withProfile(name)
}

getSecret() 🔗

Retrieve a secret from SecretsManager

Return Type
Secret !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 get-secret --name string
func (m *myModule) example(name string) *Secret  {
	return dag.
			SecretManager().
			Aws().
			GetSecret(name)
}
@function
def example(name: str) -> dagger.Secret:
	return (
		dag.secret_manager()
		.aws()
		.get_secret(name)
	)
@func()
example(name: string): Secret {
	return dag
		.secretManager()
		.aws()
		.getSecret(name)
}

setSecret() 🔗

Create or update a secret value

Return Type
String !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
valueString !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/secret-manager@2e87412257775374c640ecca06a6922c776d6b49 call \
 aws \
 set-secret --name string --value string
func (m *myModule) example(ctx context.Context, name string, value string) string  {
	return dag.
			SecretManager().
			Aws().
			SetSecret(ctx, name, value)
}
@function
async def example(name: str, value: str) -> str:
	return await (
		dag.secret_manager()
		.aws()
		.set_secret(name, value)
	)
@func()
async example(name: string, value: string): Promise<string> {
	return dag
		.secretManager()
		.aws()
		.setSecret(name, value)
}