Skip to content

Rotating credentials

The deploy identities are Entra workload-identity OIDC federated credentials. There is no secret to rotate, and they are created and changed by the bootstrap (nrit-alz-bootstrap), not in the customer repository.

Four items are real secrets and do rotate.

Secret What it is How to rotate
TFPR_CHECKS_APP_PRIVATE_KEY The checks App private key the engine signs its check rows with, on the plan and apply environments. Generate a new private key on the App, export it as TF_VAR_checks_app_private_key and re-apply the bootstrap, then delete the old key on the App.
INFRACOST_API_KEY The cost gate's key. Replace the secret with a new static key from the Infracost dashboard, not the OAuth CLI flow.
The runners App private key Only on the self_hosted_private posture, where runners register with GitHub through the runners App. Supplied to the bootstrap as TF_VAR_github_runners_app_private_key. Never in a tfvars file. Generate a new private key on the App, export it, re-apply the bootstrap, then delete the old key on the App.
The GitHub PAT used by the bootstrap The fallback when no runners App is set (github_runners_app_id null). Supplied as TF_VAR_github_runners_token, falling back to github_token. Never in a tfvars file. Issue a new PAT, export it, and re-apply the bootstrap so the runners re-register.

The license and entitlement (TFPR_LICENSE, TFPR_ENTITLEMENT) are not secrets and do not expire, so they never rotate. Replace one only when it is revoked; see License.

A bad INFRACOST_API_KEY rotation degrades to no cost output rather than a failed plan: the cost gate notes the missing key and skips. See The cost gate shows "skipped".

After any rotation, dispatch the drift workflow to confirm the engine still authenticates, rather than finding out on the next customer PR.