A structured secret groups several related values under one name, each a named field with its own type. It suits something that is really a set of values that belong together — a database's host, port, user, and password, say. Each field is its own value with its own version history.
Create a structured secret#
In an environment, select the
+at the top right of the secrets table and choose Structured.Name the secret, then add a field for each value: a field name, its type, and its value.
Add as many fields as you need with Add field.
To have a field's value generated and replaced on a schedule, switch on Rotate on that field, and set the schedule shown under the fields. See Automatic rotation.
To create it in the other stages as well, tick them under Also set in; each gets a linked copy with the same fields and values. Then create.
Each field picks its own type, and its value box matches — a code editor for a JSON field, a generator for a password field, and so on, the same controls a single-value secret uses. See Secret types for what each type accepts.
Reveal the values#
Reveal shows every field's current value together. As with any secret, each reveal is recorded in your audit log.
Change a field#
Open Edit values, choose the field to change from the picker, and set its new value. Each field keeps its own version history, so changing one field leaves the others untouched. A change in one environment leaves its linked copies as they are.
Fields that rotate automatically aren't offered in the picker; their values come from the rotation. Choose which fields rotate, or switch rotation off, from Rotation in the secret's row menu. See Automatic rotation.
Rename and delete#
Rename changes the secret's name in this environment, and in its linked copies if it has any. Delete removes the whole secret, all of its fields, from the environment you are in; its linked copies stay. Linked copies work the same way as for single-value secrets, including Unlink; see Single-value secrets.