gruntwork-io/cloud-nuke

cloud-output to stdout or a file?

Closed this issue · 4 comments

cloud-nuke output seems to get lost on some pipeline interfaces. is it possible to just dump the dry-run output of the resources that would be deleted to something without fancy graphics?

I agree, having a no-graphics option would be nice. For me it looks fine on some dashboards, but Kubernetes, for instance doesn't render the emojis correctly

In my use case I use cloud-nuke as a library, and it leads to very ugly logs around my logs. I would prefer having the option of removing the extra logs from the pipeline interface and having a report of what has been done.

I've tried some stuff in my fork but it did not come up with a satisfying solution, which does not either add a breaking change or needs a lot of work

  • sending all pipeline to stderr, and then trying to send stdout and stderr at different places (go run main.go >output.log 2>error.log). Not very easy to use in a container later
  • Remove the progress-bar altogether, optionnaly. It does not remove all the weird stuff but a good chunk of it. But it breaks a public function.

Anyway, would love to head contributors about this topic, since I am not sure this kind of changes fits with their roadmap

I screwed up. It turns out the functionality already exists, but not with dry-run. I drop the dry-run flag and use this example form the docs instead (using inspect-aws instead of aws)
AWS_PROFILE=gruntwork-dev cloud-nuke inspect-aws --region us-east-1

That generates plain output to stderr.

I think dry-run should deliver this capability, but that's a nit. I have a work-around

Glad you found a workaround.