Grant Workload Secret Access
grant_workload_secret_accessGrant an EXISTING workload access to a secret: ensures the workload has an identity and creates/updates a policy binding with the reveal permission. Never returns secret values. The workload must already exist — for a NEW workload, call create_workload first, then this (a deployment referencing a secret stays paused until access is granted, then resumes). The secret must exist too — if missing, draft its manifest with placeholder values for the user to fill in and apply themselves (setup-secret skill), then re-run. Does NOT modify workload env/volumes — reference the secret there via cpln://secret/ in the spec. Recommended reading before first use: get_cpln_skill("setup-secret") — the runbook for this tool family (read once per session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gvc | Yes | GVC slug (lowercase kebab-case). Use the GVC the user named; otherwise discover with list_resources (kind="gvc") and let them choose — never guess (a wrong GVC targets the wrong environment). | |
| org | Yes | Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants. | |
| policyName | No | Optional org-scoped policy resource name to create/use; pass the name only. Omit to default to {gvc}-{workloadName}-secrets-policy. | |
| secretName | Yes | Existing org-scoped secret name to grant access to; pass the name only, not cpln://secret/... or //secret/... . | |
| identityName | No | Optional identity resource name to create/use in this GVC; pass the name only. Omit to default to {gvc}-{workloadName}. | |
| workloadName | Yes | Existing workload name that should receive secret access; pass the name only, not a link. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary. | |
| summary | Yes | One-line summary of the result. | |
| nextSteps | No | Recommended follow-up actions for this task, in order. |