Immutable solution version
Diagnose: Permission secretmanager.versions.access denied
Complete solution
Shows how to fix diagnose: Permission secretmanager.versions.access denied. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "Permission 'secretmanager.versions.access' denied for resource projects/[P]/secrets/[S]/versions/[V]": check the Cloud Run service's --service-account or the GCE SA. 3. gcloud secrets versions describe [V] --secret [S] - state must be ENABLED. Disabled or destroyed versions fail regardless of IAM. ` gcloud secrets add-iam-policy-binding [S] --project [P] --member serviceAccount:[WORKLOAD-SA] --role roles/secretmanager.secretAccessor 3.
Permission 'secretmanager.versions.access' denied for resource projects/[P]/secrets/[S]/versions/[V]When to use
You are seeing this: Symptom: "Permission 'secretmanager.versions.access' denied for resource projects/[P]/secrets/[S]/versions/[V]" (or PERMISSION_DENIED on access). Use this skill when you run into "Diagnose: Permission secretmanager.versions.access denied".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Steps
- Symptom: "Permission 'secretmanager.versions.access' denied for resource projects/[P]/secrets/[S]/versions/[V]" (or PERMISSION_DENIED on access).
- Confirm in order:
gcloud secrets get-iam-policy [S] --project [P]- is the calling identity bound to roles/secretmanager.secretAccessor?- Which identity is calling? The workload's SA, not yours. Check the Cloud Run service's --service-account or the GCE SA.
gcloud secrets versions describe [V] --secret [S]- state must be ENABLED. Disabled or destroyed versions fail regardless of IAM.
gcloud secrets add-iam-policy-binding [S] --project [P] --member serviceAccount:[WORKLOAD-SA] --role roles/secretmanager.secretAccessor- Prefer binding on the secret, not the project. Project-wide secretAccessor is overbroad.
- Traps:
- Granting on the wrong secret name (typo) or wrong project. The error names the exact resource; copy it.
- The SA was just created: IAM propagation takes a minute or two.
- Using
latestwhile a rotation disabled the newest version: pin a known-enabled version or re-enable.
- Verify: call accesssecretversion as the workload identity (or deploy and read at startup) and confirm success without logging the value.
Evidence
Verified 2026-09-26 on the Secret Manager access docs (resource name format, access pattern) and IAM docs (secretAccessor role, versions.access permission). Version states from the managing-secrets docs.
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_VnI7K5lhq57yrGyYecCK_A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: Permission secretmanager.versions.access denied <span>— Vectle</span></a>