bridgecrewio / yor

Extensible auto-tagger for your IaC files. The ultimate way to link entities in the cloud back to the codified resource which created it.
https://www.yor.io
Apache License 2.0
826 stars 123 forks source link

Add check mode for yor tag command #364

Closed hartzell closed 1 year ago

hartzell commented 1 year ago

This commit adds a "check" mode to the tag command, which causes yor to exit with a non-zero status (by calling log.Error()) if any changes were (or would have been, if in dry mode) made.

This is useful in CI pipelines, where one wants to confirm that everything is tagged appropriately. Check mode is simpler to use in CI than parsing the CLI output.

The check for changes is made after the report is printed, as knowing what was/would-have-been changed is useful in debugging CI failures.

This commit:

Quibbles:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

hartzell commented 1 year ago

HI @tronxd and @gruebel -- Anything I can do to help keep this moving? Thanks!

hartzell commented 1 year ago

@tronxd and @gruebel -- Anything I can do to help keep this moving?

Thanks!

omryMen commented 1 year ago

@hartzell sorry for the late response.. merged

hartzell commented 1 year ago

NP, thanks for the support!