Setup cloud access

From controlplane-com/ai-plugin · View interactive version

Setup cloud access is an AI agent skill from the GitHub repository controlplane-com/ai-plugin. Credential-free cloud access (Universal Cloud Identity) for a Control Plane workload. Use when a workload needs AWS, GCP, Azure, or NATS NGS resources without embedded keys, or asks to register a cloud account.

How to use this skill

Skill file

Cloud Access Setup (Universal Cloud Identity)

Tool availability: create_cloud_account, update_cloud_account, and how_to_create_cloud_account need ?toolsets=full; grant_cloud_access, create_identity, and update_identity are core.

A workload reads cloud resources with no embedded keys: a GVC-scoped identity carries a per-provider cloud-access block that federates with the provider's IAM, and Control Plane vends short-lived credentials at runtime. Cloud SDKs (boto3, google-cloud, @azure/sdk) pick them up automatically — no SDK config.

The chain

One call once the cloud account exists: mcp__cpln__grant_cloud_access (workload, provider, cloudAccount, and the provider block from step 3) ensures the workload's identity, attaches the cloud account to it, and waits for status.<provider>.usable (none comes for a reused roleName or serviceAccount). Steps 3 and 4 below are what it does, for hand-built setups.

| Step | What must be true | Without it |

|---|---|---|

| 1. Cloud account | a cloud_account (org-wide) maps to the provider, registered after the cloud-side IAM setup | identity can't federate |

| 2. Identity cloud block | the identity carries an aws/gcp/azure/ngs block linking that cloud account | no credentials vended |

| 3. Workload link | the identity is attached to the workload (spec.identityLink) | workload has no identity |

Order is strict: the cloud account must exist before the identity's cloud block references it.

Key constraints

Step 1 — Cloud-side IAM setup

Each provider needs IAM configured on the provider side first so Control Plane can assume a role / impersonate a service account. Run the per-provider how-to to get the org-specific values (Control Plane's AWS account ID + external ID, the GCP service-account email, the Azure Function-App connector steps) — never guess these:

CLI fallback: cpln cloudaccount create-<provider> --how --org ORG.

Step 2 — Register the cloud account

create_cloud_account (provider = aws/gcp/azure/ngs), passing the value the provider needs:

| Provider | Required field |

|---|---|

| aws | roleArn (the role ARN from step 1) |

| gcp | projectId |

| azure | secretLink to an existing azure-connector secret (created by the user) |

| ngs | secretLink to an existing nats-account secret (created by the user) |

status.usable stays false until the cloud-side IAM exists. update_cloud_account edits the data block / tags (provider stays immutable). CLI fallback: cpln cloudaccount create-aws|create-gcp|create-azure|create-ngs.

Step 3 — Identity with a cloud-access block

create_identity (or update_identity on an existing one) accepts the per-provider block directly — pass aws, gcp, azure, or ngs. On update each block replaces wholesale; removeCloudIdentities: ["aws"] detaches one. Every block needs cloudAccountLink: //cloudaccount/NAME. The pattern per provider:

spec:
  aws:
    cloudAccountLink: //cloudaccount/my-aws
    policyRefs: ["aws::AmazonS3ReadOnlyAccess", "MyCustomPolicy"]

CLI fallback (MCP unavailable / CI-CD): cpln identity get NAME --gvc GVC -o yaml-slim > id.yaml, add the block under spec, cpln apply -f id.yaml. Confirm the exact shape with get_resource (kind identity, schema: true) before authoring YAML by hand.

Step 4 — Link to the workload and verify

update_workload sets spec.identityLink = //identity/NAME (CLI: cpln workload update NAME --set spec.identityLink=//identity/NAME).

Read the identity back with get_resource (kind identity): status.<provider>.usable must be true; if false, read status.<provider>.lastError. Control Plane writes none for a reused roleName or serviceAccount: the workload's own cloud calls are the check there. Cloud CLIs are usually absent from production containers, so a missing aws/gcloud/az does not mean access is broken: the SDK path still works.

Private-network resources

Reaching a private VPC / on-prem endpoint is a different mechanism on the same identity: a networkResources (agent/wormhole) or nativeNetworkResources (AWS PrivateLink / GCP PSC) array, not a cloud-access block. For the agent deployment walkthrough use setup-agent; for the comparison, producer-side setup, and the resource schema use native-networking.

Common mistakes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.