crossplane / crossplane/cli

Add `crossplane resource simulate`

Open
#368 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
19
Forks
31
Avg merge
3d 4h
Merged PRs (30d)
52

Description

### What

Add `crossplane resource simulate` as an alpha command, per the accepted design ([crossplane/cli#181](https://github.com/crossplane/cli/pull/181),[design/one-pager-cli-simulate.md](https://github.com/crossplane/cli/blob/main/design/one-pager-cli-simulate.md)): given YAML for one or more MRs (`-f`), show what applying them would do.

- For each input resource, fetch the live MR from the cluster if one exists.
- Diff desired against live spec client-side; this is the `[?]` approximate path from the design, and until the plan layer exists every resource takes it, marked accordingly.
- A resource with no live counterpart plans as a create.
- Summary line and `-o plan|diff|json|yaml`, shared with `project simulate`

## Acceptance criteria

- [ ] `crossplane resource simulate -f resources.yaml` (alpha) previews creates and updates against the current kubeconfig context.
- [ ] Output marks all results as approximate (`[?]`) until the plan layer exists, with the documented closing warning.
- [ ] Output formats and summary shared with `project simulate` (no second implementation).

## Out of scope

- Plan servers and provider-computed diffs, `--all` provider upgrade preview, `--provider-images` (follow-up issue: plan layer).

## Dependencies

Depends on the work in https://github.com/crossplane/cli/issues/367

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.