Supported stores
The reference’s scheme picks the store.Available helpers
resolveSecret— Read a secret from a secret storeisSecretReference— Check that a string is a supported secret reference
Function reference
resolveSecret
The secret reference. For 1Password, a secret reference:
op://<vault>/<item>/<field>, or op://<vault>/<item>/<section>/<field>, optionally followed by a query such as ?attribute=otp.The type is checked at compile time. A string literal that isn’t a supported reference, such as "op://vault", doesn’t compile. A string variable has to be narrowed first with isSecretReference.string.
Throws
- An
Errorif the Run is traced and nowithoutTracingblock is open. - A
TypeErrorifreferenceisn’t a supported secret reference. SecretResolveErrorif the secret can’t be read. This happens when the store’s integration isn’t enabled, its credentials are missing or can’t read the item, or the machine running the Run doesn’t answer in time. The message names the reference, never the secret.
For 1Password, every call counts toward your service account’s rate limits. Resolve a secret once per Run and reuse it rather than calling it in a loop.
isSecretReference
true if value is a supported secret reference. Use it to pass a reference that arrives as a string, such as a Run parameter:
Related
- 1Password integration: Set up the vault, the service account, and the token.
- Pause tracing: Control what gets recorded around a sensitive step.
- Ephemeral parameters: For a secret that belongs to a single Run.