Dagger
Search

infisical

Fetch and work with secrets for your dagger application using Infisical.

Installation

dagger install github.com/Infisical/infisical-dagger@98042321db6b3995f2f0d874c61990c3c73d7d30

Entrypoint

Return Type
Infisical !
Arguments
NameTypeDescription
apiUrlString !Your self-hosted Infisical site URL. Default: https://app.infisical.com.
accessTokenString !Your self-hosted Infisical site URL. Default: https://app.infisical.com.
Example
dagger -m github.com/Infisical/infisical-dagger@98042321db6b3995f2f0d874c61990c3c73d7d30 call \
 --api-url string --access-token string
func (m *myModule) example(apiUrl string, accessToken string) *Infisical  {
	return dag.
			Infisical(apiUrl, accessToken)
}
@function
def example(api_url: str, access_token: str) -> dag.Infisical:
	return (
		dag.infisical(api_url, access_token)
	)
@func()
example(apiUrl: string, accessToken: string): Infisical {
	return dag
		.infisical(apiUrl, accessToken)
}

Types

Infisical 🔗

withUniversalAuth() 🔗

Authenticate with Universal Auth

Return Type
Infisical !
Arguments
NameTypeDefault ValueDescription
clientIdSecret !-Your Machine Identity Client ID
clientSecretSecret !-Your Machine Identity Client Secret.
Example
dagger -m github.com/Infisical/infisical-dagger@98042321db6b3995f2f0d874c61990c3c73d7d30 call \
 --api-url string --access-token string with-universal-auth --client-id env:MYSECRET --client-secret env:MYSECRET
func (m *myModule) example(apiUrl string, accessToken string, clientId *Secret, clientSecret *Secret) *Infisical  {
	return dag.
			Infisical(apiUrl, accessToken).
			WithUniversalAuth(clientId, clientSecret)
}
@function
def example(api_url: str, access_token: str, client_id: dagger.Secret, client_secret: dagger.Secret) -> dag.Infisical:
	return (
		dag.infisical(api_url, access_token)
		.with_universal_auth(client_id, client_secret)
	)
@func()
example(apiUrl: string, accessToken: string, clientId: Secret, clientSecret: Secret): Infisical {
	return dag
		.infisical(apiUrl, accessToken)
		.withUniversalAuth(clientId, clientSecret)
}

getSecretByName() 🔗

Get a secret by name

Return Type
Secret !
Arguments
NameTypeDefault ValueDescription
secretNameString !-The name of the secret to get.
projectIdString !-The ID of the project to get the secret from.
environmentSlugString !-The slug of the environment to get the secret from.
secretPathString !-The path of the secret to get.
expandSecretReferencesBoolean !trueWhether or not to expand secret references
includeImportsBoolean !trueWeather to include imported secrets or not.
Example
dagger -m github.com/Infisical/infisical-dagger@98042321db6b3995f2f0d874c61990c3c73d7d30 call \
 --api-url string --access-token string get-secret-by-name --secret-name string --project-id string --environment-slug string --secret-path string --expand-secret-references boolean --include-imports boolean
func (m *myModule) example(apiUrl string, accessToken string, secretName string, projectId string, environmentSlug string, secretPath string, expandSecretReferences bool, includeImports bool) *Secret  {
	return dag.
			Infisical(apiUrl, accessToken).
			GetSecretByName(secretName, projectId, environmentSlug, secretPath, expandSecretReferences, includeImports)
}
@function
def example(api_url: str, access_token: str, secret_name: str, project_id: str, environment_slug: str, secret_path: str, expand_secret_references: bool, include_imports: bool) -> dagger.Secret:
	return (
		dag.infisical(api_url, access_token)
		.get_secret_by_name(secret_name, project_id, environment_slug, secret_path, expand_secret_references, include_imports)
	)
@func()
example(apiUrl: string, accessToken: string, secretName: string, projectId: string, environmentSlug: string, secretPath: string, expandSecretReferences: boolean, includeImports: boolean): Secret {
	return dag
		.infisical(apiUrl, accessToken)
		.getSecretByName(secretName, projectId, environmentSlug, secretPath, expandSecretReferences, includeImports)
}

getSecrets() 🔗

List secrets

Return Type
[Secret ! ] !
Arguments
NameTypeDefault ValueDescription
projectIdString !-The ID of the project to get the secret from.
environmentSlugString !-The slug of the environment to get the secret from.
secretPathString !-The path of the secret to get.
expandSecretReferencesBoolean !trueWhether or not to expand secret references
recursiveBoolean !falseWhether or not to fetch all secrets from the specified base path, and all of its subdirectories. Note, the max depth is 20 deep.
includeImportsBoolean !trueWeather to include imported secrets or not.
tagFilters[String ! ] ![]No description provided
Example
dagger -m github.com/Infisical/infisical-dagger@98042321db6b3995f2f0d874c61990c3c73d7d30 call \
 --api-url string --access-token string get-secrets --project-id string --environment-slug string --secret-path string --expand-secret-references boolean --recursive boolean --include-imports boolean --tag-filters string1 --tag-filters string2
func (m *myModule) example(apiUrl string, accessToken string, projectId string, environmentSlug string, secretPath string, expandSecretReferences bool, recursive bool, includeImports bool, tagFilters []string) []*Secret  {
	return dag.
			Infisical(apiUrl, accessToken).
			GetSecrets(projectId, environmentSlug, secretPath, expandSecretReferences, recursive, includeImports, tagFilters)
}
@function
def example(api_url: str, access_token: str, project_id: str, environment_slug: str, secret_path: str, expand_secret_references: bool, recursive: bool, include_imports: bool, tag_filters: List[str]) -> List[dagger.Secret]:
	return (
		dag.infisical(api_url, access_token)
		.get_secrets(project_id, environment_slug, secret_path, expand_secret_references, recursive, include_imports, tag_filters)
	)
@func()
example(apiUrl: string, accessToken: string, projectId: string, environmentSlug: string, secretPath: string, expandSecretReferences: boolean, recursive: boolean, includeImports: boolean, tagFilters: string[]): Secret[] {
	return dag
		.infisical(apiUrl, accessToken)
		.getSecrets(projectId, environmentSlug, secretPath, expandSecretReferences, recursive, includeImports, tagFilters)
}