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
| Attribute | Type | Description |
|---|---|---|
| key | str | The name of the secret in the secret store. |
| group | Optional[str] = None | The group of the secret in the secret store. |
| mount | `pathlib.Path | None` = None |
| as_env_var | Optional[str] = None | The 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
| Name | Type | Description |
|---|---|---|
| key | str = null | The name of the secret in the secret store. |
| group | Optional[str] = None | The group of the secret in the secret store. |
| mount | `pathlib.Path | None` = None |
| as_env_var | Optional[str] = None | The 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
| Type | Description |
|---|---|
str | A hexadecimal string representing the stable hash of the secret. |