From d2b38c8542eff5a8f4d5be223136c1c78a4574f2 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 17 May 2024 00:25:14 +0200 Subject: [PATCH] chore(snippets/pulumi): add useful commands --- snippets/pulumi.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snippets/pulumi.fish b/snippets/pulumi.fish index 1bf43dd..6794f5b 100644 --- a/snippets/pulumi.fish +++ b/snippets/pulumi.fish @@ -30,3 +30,7 @@ function pulumi-urnRegex2urn pulumi stack export \ | jq -r --arg regex "$argv[1]" '.deployment.resources[]|select(.urn|test($regex)).urn' - end + +# Get the URN (or other stuff) of resources that would be deleted +pulumi preview --json | jq -r '.steps[]|select(.op=="delete").urn' - +pulumi preview --json | jq -r '.steps[]|select(.op=="delete").oldState.id' -