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. The secret key is the name of the secret in the secret store. The group is optional and maybe used with some secret stores to organize secrets. The as_env_var is an optional parameter that can be used to specify the name of the environment variable that the secret should be mounted as.

Attributes

AttributeTypeDescription
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.

Constructor

Signature

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

Parameters

NameTypeDescription
keystr = nullThe 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() - > str

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

Returns

TypeDescription
strA hexadecimal string representing the stable hash of the secret.