Skip to main content

Secret

Secrets are used to inject sensitive information into tasks or image build context. Secrets can be mounted as environment variables or files.

Attributes

AttributeTypeDescription
keystrThe name of the secret in the secret store.
groupOptional[str] = nullThe group of the secret in the secret store.
mount`pathlib.PathNone` = null
as_env_varOptional[str] = nullThe name of the environment variable that the secret should be mounted as.

Constructor

Signature

def Secret(
key: str,
group: Optional[str] = None,
mount: pathlib.Path | None = None,
as_env_var: Optional[str] = None
)

Parameters

NameTypeDescription
keystrThe name of the secret in the secret store.
groupOptional[str] = NoneThe group of the secret in the secret store.
mount`pathlib.PathNone` = None
as_env_varOptional[str] = NoneThe name of the environment variable that the secret should be mounted as.

Methods


stable_hash()

@classmethod
def stable_hash() - > string

Deterministic, process-independent hash (as hex string).

Returns

TypeDescription
stringA SHA-256 hex string representing the unique identity of the secret based on its key, group, mount, and environment variable name.