passphrase
The passphrase rotator enables you to rotate any user-defined key in your ESC environment by generating memorable passphrases.
If you want to generate random passwords use the password rotator
Inputs
| Property | Type | Description |
|---|---|---|
separator | string | A single character used as the word separator. (default: -) |
capitalize | boolean | Whether to capitalize each generated word. (default: false) |
length | int | The number of words in the generated passphrase (3–15). (default: 5) |
Example
The passphrase rotator can be configured for any user-defined key.
values:
mypassphrase:
fn::rotate::passphrase:
inputs:
separator: "%"
capitalize: true
length: 4
This configuration will generate passphrases like Mouth%Purebred%Headstone%Plausibly.
When you open the environment, you should see output similar to the following:
{
"mypassphrase": {
"current": "[secret]",
"previous": "[secret]"
}
}
State (Optional)
| Property | Type | Description |
|---|---|---|
current | string | The most recently generated passphrase. |
previous | string | The prior generated passphrase. |
Outputs
| Property | Type | Description |
|---|---|---|
current | string | The most recently generated passphrase, stored as a secret. |
previous | string | The prior generated passphrase, stored as a secret. |
Troubleshooting
| Symptom | Likely cause | Resolution |
|---|---|---|
| Rotation fails with an invalid input error | length is outside 3–15, or separator is not a single character. | Set length within range and separator to a single character, then rotate again. |
| The generated passphrase is shorter or longer than expected | length counts words, not characters. | Adjust length to the desired number of words; the character count varies with the words chosen. |
Related
- Rotators - How credential rotation works in Pulumi ESC
- password rotator - Generate random passwords instead of memorable passphrases
- Rotators reference - Catalog of all ESC rotators