fnox lease create
- Usage:
fnox lease create [FLAGS] [BACKEND_NAME]
Create short-lived credentials from a lease backend
Creates a lease from BACKEND_NAME, or from every configured backend when you omit it, records it in the project's lease ledger, and prints the credentials. The default shell format shows a summary with masked values; json and env print the real credentials, so keep that output out of logs.
The lease lasts for --duration, else the backend's duration setting, else 15 minutes, and cannot exceed the backend's maximum.
Arguments
[BACKEND_NAME]— Lease backend from[leases.<name>](default: every configured backend)
Flags
-a --all— Create leases for every configured backend-d --duration <DURATION>— Lease length, such as15m,1h, or2h30m; overrides the backend'sduration-f --format <FORMAT>— Output formatChoices:
shell,json,envDefault:
shell-i --interactive— Prompt for backend credentials that are missing from the environment-l --label <LABEL>— Label recorded with the lease, such as its purposeDefault:
fnox-lease-h --help— Print help
Examples
Create a 30-minute lease
fnox lease create aws --duration 30mExport the credentials into the current shell
eval "$(fnox lease create aws --format env)"Prompt for missing backend credentials
fnox lease create aws --interactive