Crossplane Managed Resource Import & Observe-Only Prompt
Bring existing brownfield cloud resources under Crossplane management using the crossplane.io/external-name annotation and observe-only policies, without recreating or mutating live infrastructure.
- Target user
- Platform engineers adopting Crossplane over an existing cloud estate
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a platform engineer adopting Crossplane on top of a cloud estate that already exists — VPCs, buckets, databases, and DNS records that were created by console, Terraform, or CloudFormation. Your job is to import them into Crossplane as managed resources without a single destroy or in-place mutation, then decide which stay observe-only and which Crossplane may reconcile. I will provide: - The provider (`provider-aws`, `provider-gcp`, `provider-azure`, or the Upbound family providers) and versions - The existing resources to adopt and their real cloud identifiers (ARNs, IDs, names) - Which resources are safe for Crossplane to fully manage vs. must remain read-only for now - Whether another tool (Terraform/CFN) still owns any of them Your job: 1. **Import mechanics** — for each resource, write the managed-resource manifest with the correct `crossplane.io/external-name` annotation set to the real external identifier, and explain how Crossplane's `Observe` then `Update` loop adopts it. Cover the providers where the external-name is NOT the ID (composite keys, region-qualified names). 2. **Observe-only first** — set `managementPolicies: ["Observe"]` (or the legacy `spec.deletionPolicy`/`managementPolicies` combination) so Crossplane reconciles the resource read-only, letting you diff `spec.forProvider` against reality before granting write. Show the exact policy per resource. 3. **Drift reconciliation** — after observe confirms a match, give the safe path to widen `managementPolicies` to `["*"]`, and flag every `forProvider` field that, if it disagrees with reality, would trigger an update or replacement on first full reconcile. 4. **Split-ownership guardrails** — for resources another IaC tool still owns, set `deletionPolicy: Orphan` and keep observe-only so two controllers never fight; define the cutover order to hand ownership to Crossplane cleanly. 5. **Verification** — commands to confirm adoption: `kubectl get managed`, checking `SYNCED`/`READY` conditions, and `kubectl describe` to prove no update was applied. Nothing should show a diff before you intend it to. Output as: (a) an import manifest per resource with external-name and management policy, (b) the observe-then-manage promotion runbook, (c) a per-field drift/replace-risk table, (d) the split-ownership cutover order and verification commands. Assume these resources serve production.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Crossplane v2 Namespaced XR Migration Prompt
Plan the migration from Crossplane v1 cluster-scoped composite resources and claims to v2 namespaced XRs, updating XRDs, compositions, and RBAC without orphaning managed resources.
-
Click-Ops to IaC Conversion Prompt
Reverse-engineer manually-created (click-ops) cloud resources into clean infrastructure-as-code and import them into state without recreating or disrupting live resources, across any IaC tool.
-
Crossplane Composition Testing with uptest Prompt
Build a render-and-test workflow for Crossplane Compositions so XR changes are validated against expected managed resources before they reach a cluster.
-
Crossplane Composition Functions Prompt
Author Crossplane composition functions (pipeline mode with KCL, Go templating, or Python) to generate composed resources dynamically — replacing brittle patch-and-transform with testable, conditional logic.
More Infrastructure as Code prompts & error guides
Browse every Infrastructure as Code prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.