OpenParable
Skip to content
← Back to skills

Kcc Direct Identity Implementer

Development
kcc-direct-identity-implementer

Kcc Direct Identity Implementer is an Agent Skill for development published in the GoogleCloudPlatform/k8s-config-connector repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Implement the IdentityV2 and ExternalIdentifier interfaces for a direct KCC resource. Use this when implementing IdentityV2 and refs.Ref for a resource.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/HEAD/.gemini/skills/kcc-direct-identity-implementer/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/kcc-direct-identity-implementer, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

KCC Direct Identity Implementer

This skill guides the implementation of the IdentityV2 and ExternalIdentifier interfaces for direct KCC resources, ensuring they follow the canonical gcpurls.Template pattern.

Inputs

  • resource_kind: The KCC Kind (e.g., VertexAIExampleStore).
  • template: The GCP URL template (e.g., projects/{project}/locations/{location}/exampleStores/{example_store}).
  • api_version: The KCC API version.

Workflow

  1. Implement Identity: Create apis/<service>/<api_version>/<resource_lower>_identity.go.

    • Use identity.IdentityV2.
    • Use gcpurls.Template for URL parsing.
    • Implement ExternalIdentifier().
    • Implement ParentString() string to return the GCP parent URI (e.g., projects/{project} or projects/{project}/locations/{location}).
  2. Parent & Hierarchy Support:

    • Ensure the Spec struct has a ProjectRef (and Location if applicable).
    • Hierarchical Branching: If the GCP resource supports multiple hierarchies (e.g., Global and Regional), implement logic in String() and FromExternal() to handle both. Use the presence of the location field in the Spec to determine which pattern to use.

Journaling

Append any template mapping complexities (e.g., multi-parent or multi-hierarchy resources) to .gemini/journals/<service>.md using the format described in the kcc-agentic-journaler skill.