Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature-request: add "validate" command #1256

Closed
madpipeline opened this issue Aug 14, 2024 · 4 comments
Closed

Feature-request: add "validate" command #1256

madpipeline opened this issue Aug 14, 2024 · 4 comments

Comments

@madpipeline
Copy link

When running aws-nuke on sandbox accounts via CI tools, it would be useful to be able to validate the configuration directly, without requiring to be logged into an AWS account. Basically just make sure the YAML schema is valid.

This already happens on every run of aws-nuke by default, but it requires and AWS session, thus we cannot validate it in PR checks, where AWS accounts access is limited.

@ekristen
Copy link
Collaborator

I've really tried to not directly link to my fork, but in this case try it out - https://github.com/ekristen/aws-nuke - https://ekristen.github.io/aws-nuke/cli-usage/#aws-nuke-explain-config

However I don't have a validate per-say, it's an explain configuration.

In your request for a validate, what has gone wrong in the past that you are looking for validation of?

@madpipeline
Copy link
Author

We have a dedicated git repository containing the AWS nuke configuration and the CI pipeline configuration for running it nightly on the sandbox accounts.

This repository only gets changes via PR. We need the PR checks to do some checks on the changes, and so far we just have a YAML linter. Ideally this would run a dry-run, but that would imply giving some AWS permissions on non-main branches, and that is a no go.

The middle ground for this would be to at least validate that there are no schema errors in the aws-nuke configuration. Any issues in the filters can be resolved in a subsequent PR.

@ekristen
Copy link
Collaborator

Try the explain-config out on my branch, this might be along the lines of what you are thinking of.

As for validating the configuration. What sort of errors have you run into the past? Trying to figure out what sort of validation you want.

I'm not really sure what sort of validation could be done other than are all the resource names under Filters valid.

@ekristen
Copy link
Collaborator

@madpipeline please check out the fork of aws-nuke and it's explain-config command, if there is additional functionality you are looking for please open an issue over on the fork.


Please see the copy of the notice from the README about the deprecation of this project. Sven was kind enough to grant me access to help triage and close issues and pull requests that have already been addressed in the actively maintained fork. Some additional information is located in the welcome issue for more information.

Caution

This repository for aws-nuke is no longer being actively maintained. We recommend users to switch to the actively maintained fork of this project at ekristen/aws-nuke.
We appreciate all the support and contributions we've received throughout the life of this project. We believe that the fork will continue to provide the functionality and support that you have come to expect from aws-nuke.
Please note that this deprecation means we will not be addressing issues, accepting pull requests, or making future releases from this repository.
Thank you for your understanding and support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants