Slightly odd question, but does anyone have any so...
# general
m
Slightly odd question, but does anyone have any sort of script that can take a state file, and tell you how many resources are in it? I know I could do this with the preview command but for various reasons I won't go into, I can't run that
l
Assuming you mean an exported state file in JSON format, you might be able to do it with e.g. `jq`:
Copy code
pulumi stack export | jq '.deployment.resources | length`
(You might want to apply filtering e.g. to remove default providers or the like, but this could be a good starting point)
m
Great, thanks