Table of contents
pocketid_oidc_client_secret
One secret of a confidential OIDC client. You generate the value and write it to wherever the service reads it (for example an xyOps vault with a write-only field), and to this resource. The value is write-only: it is sent to Pocket ID once and never stored in plans or state. Requires OpenTofu 1.11 or later.
ephemeral "random_password" "cf" { length = 48, special = false }
resource "pocketid_oidc_client_secret" "contextforge" {
client_id = pocketid_oidc_client.contextforge.client_id
value_wo = ephemeral.random_password.cf.result
value_wo_version = 1
}
Arguments
client_id(required): the client the secret belongs to. Changing it replaces the secret.value_wo(required, write-only, sensitive): 16-256 printable ASCII characters, no spaces.value_wo_version(required): change it to rotate. OpenTofu cannot seevalue_wo, so a new version is what sends a new value.
Attributes
id: Pocket ID's secret ID.prefix: the first characters of the secret, as Pocket ID shows them.
Rotation
A new value_wo_version replaces the resource. Add lifecycle { create_before_destroy = true } so the new secret exists before the old one is revoked, and update the consumer's copy in the same apply. A secret revoked in the Pocket ID UI is planned again on the next run.
There is no import: an existing secret's value cannot be read back. Adopt an existing client with pocketid_oidc_client import, keep its current secret where it is, and declare a pocketid_oidc_client_secret only when you are ready to rotate.
Published from docs/ (refs/tags/v0.1.0-dev.1, b8b63b847568). Edit the source in a pull request; wiki edits are replaced on the next publish.