CLI reference/Rotation, leases and syncs/rotation
clavis rotation create
Create a rotation policy
sh
clavis rotation create KEY [flags]Create a rotation policy for a key.
Examples
Postgres role password, daily
sh
clavis rotation create DATABASE_PASSWORD --provider postgres \
--pg-host db.internal --pg-database app --pg-username admin \
--pg-password "$PGPASSWORD" --pg-role app_user --interval 24hMySQL user password, weekly
sh
clavis rotation create MYSQL_PASSWORD --provider mysql \
--mysql-host db.internal --mysql-database app --mysql-username admin \
--mysql-password "$MYSQL_PASSWORD" --mysql-role app_user --interval 168hYour own webhook, monthly
sh
clavis rotation create PARTNER_API_KEY --provider webhook \
--webhook-url https://rotate.example.com/partner --webhook-secret "$HMAC_SECRET" \
--interval 720hFlags
--aws-access-key string- AWS access key ID
--aws-region string- AWS region Default:
us-east-1 --aws-secret-key string- AWS secret access key
--aws-user string- IAM user whose access key rotates
--enabled- enable the schedule Default:
true --interval duration- rotation interval Default:
24h --mysql-database string- MySQL database
--mysql-host string- MySQL host Default:
localhost --mysql-password string- MySQL admin password
--mysql-port int- MySQL port Default:
3306 --mysql-role string- MySQL user whose password rotates
--mysql-tls string- MySQL TLS: false, true, skip-verify, or preferred
--mysql-username string- MySQL admin user
--pg-database string- PostgreSQL database
--pg-host string- PostgreSQL host Default:
localhost --pg-password string- PostgreSQL admin password
--pg-port int- PostgreSQL port Default:
5432 --pg-role string- PostgreSQL role whose password rotates
--pg-sslmode string- PostgreSQL sslmode Default:
disable --pg-username string- PostgreSQL admin user
--provider string- postgres, mysql, aws, or webhook Default:
postgres --webhook-secret string- webhook HMAC secret
--webhook-url string- rotation webhook URL
Details
Providers: postgres (role password), mysql/mariadb (user password), aws (IAM access key; the secret stores JSON with access_key_id and secret_access_key), and webhook (create, rollback and revoke calls, HMAC-signed).
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command