feat(scripts): add project-resource-graph.sh - #18
Open
devpie wants to merge 1 commit into
Open
Conversation
Lists the resources of one or more STACKIT projects, derives references between them from IDs found inside the objects, and optionally deletes selected objects ordered by those references after an explicit confirmation. Renders text, Mermaid or JSON. Adds the overview row and a section to scripts/README.md and regenerates AGENTS.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
scripts/project-resource-graph.sh. The script lists the resources of one or more STACKIT projects and shows which of them reference each other. It runs thelistcommand of every service in its built-in table in parallel, collects all IDs, and searches each object for strings that equal the ID of another object, so edges do not depend on hard-wired field names. Output as text, Mermaid or JSON.With
--delete KIND/NAMEit resolves the selectors against the collected inventory, orders the steps so that referencing objects go first, prints the plan with warnings, and asks for the project ID as confirmation before calling the CLI. Every executed run writes an evidence file into the current directory.image(system catalog) andkms-keyringare never deleted.Also adds the overview row and a section to
scripts/README.mdand regeneratesAGENTS.md.Verification: 35 characterization cases against a fake
stackitCLI (text, Mermaid and JSON output, key selection, all error paths, the delete path with confirmation on a pseudo-terminal) on bash 3.2 and 5.3;shellcheckreports nothing.Checklist
🤖 Generated with Claude Code