Skip to content

Commit

Permalink
docs: adding a full set of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Apr 12, 2024
1 parent 76c03e6 commit 2ff7f8d
Show file tree
Hide file tree
Showing 24 changed files with 1,336 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins:
- successComment: |
:tada: This ${issue.pull_request ? 'pull request is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:
The release is available on [GitHub release](https://github.com/ekristen/test-aws-nuke/releases/tag/${nextRelease.gitTag}) :rocket:
The release is available on [GitHub release](https://github.com/ekristen/azure-nuke/releases/tag/${nextRelease.gitTag}) :rocket:
branches:
- name: +([0-9])?(.{+([0-9]),x}).x
Expand Down
17 changes: 17 additions & 0 deletions docs/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Authentication

## CLI Flags (or environment variables)

The following flags are available for authentication:

- `--client-id` - the client-id to use for authentication
- `--client-secret` - the client-secret to use for authentication
- `--client-certificate-file` - the client-certificate-file to use for authentication
- `--client-federated-token-file` - the client-federated-token-file to use for authentication

## Environment Variables

- `AZURE_CLIENT_ID`
- `AZURE_CLIENT_SECRET`
- `AZURE_CLIENT_CERTIFICATE_FILE`
- `AZURE_FEDERATED_TOKEN_FILE`
19 changes: 19 additions & 0 deletions docs/cli-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Examples

## Basic usage

```bash
azure-nuke run --config config.yml
```

## Using the force flags

!!! danger
Running without prompts can be dangerous. Make sure you understand what you are doing before using these flags.

The following is an example of how you automate the command to run without any prompts of the user. This is useful
for running in a CI/CD pipeline.

```bash
azure-nuke run --config config.yml --force --force-delay 5
```
23 changes: 23 additions & 0 deletions docs/cli-experimental.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Experimental Features

## Overview

These are the experimental features hidden behind feature flags that are currently available in aws-nuke. They are all
disabled by default. These are switches that changes the actual behavior of the tool itself. Changing the behavior of
a resource is done via resource settings.

!!! note
The original tool had configuration options called `feature-flags` which were used to enable/disable certain
behaviors with resources, those are now called settings and `feature-flags` have been deprecated in the config.

## Usage

```console
azure-nuke run --feature-flag "some-feature"
```

**Note:** other CLI arguments are omitted for brevity.

## Available Feature Flags

No available features at this time.
15 changes: 15 additions & 0 deletions docs/cli-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Options

This is not a comprehensive list of options, but rather a list of features that I think are worth highlighting.

## Skip Prompts

`--no-prompt` will skip the prompt to verify you want to run the command. This is useful if you are running in a CI/CD environment.
`--prompt-delay` will set the delay before the command runs. This is useful if you want to give yourself time to cancel the command.

## Logging

- `--log-level` will set the log level. This is useful if you want to see more or less information in the logs.
- `--log-caller` will log the caller (aka line number and file). This is useful if you are debugging.
- `--log-disable-color` will disable log coloring. This is useful if you are running in an environment that does not support color.
- `--log-full-timestamp` will force log output to always show full timestamp. This is useful if you want to see the full timestamp in the logs.
59 changes: 59 additions & 0 deletions docs/cli-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Usage

## azure-nuke

```console
NAME:
azure-nuke - remove everything from an azure tenant

USAGE:
azure-nuke [global options] command [command options] [arguments...]

VERSION:
1.0.0

AUTHOR:
Erik Kristensen <erik@erikkristensen.com>

COMMANDS:
run, nuke run nuke against an azure tenant to remove all configured resources
resource-types, list-resources list available resources to nuke
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--help, -h show help (default: false)
--version, -v print the version (default: false)

```

## aws-nuke run

```console
NAME:
azure-nuke run - run nuke against an azure tenant to remove all configured resources

USAGE:
azure-nuke run [command options] [arguments...]

OPTIONS:
--config value path to config file (default: "config.yaml")
--include value only include this specific resource
--exclude value exclude this specific resource (this overrides everything)
--quiet, -q hide filtered messages (default: false)
--no-dry-run actually run the removal of the resources after discovery (default: false)
--no-prompt, --force disable prompting for verification to run (default: false)
--prompt-delay value, --force-sleep value seconds to delay after prompt before running (minimum: 3 seconds) (default: 10)
--feature-flag value enable experimental behaviors that may not be fully tested or supported
--environment value Azure Environment (default: "global") [$AZURE_ENVIRONMENT]
--tenant-id value the tenant-id to nuke [$AZURE_TENANT_ID]
--subscription-id value the subscription-id to nuke (this filters to 1 or more subscription ids) [$AZURE_SUBSCRIPTION_ID]
--client-id value the client-id to use for authentication [$AZURE_CLIENT_ID]
--client-secret value the client-secret to use for authentication [$AZURE_CLIENT_SECRET]
--client-certificate-file value the client-certificate-file to use for authentication [$AZURE_CLIENT_CERTIFICATE_FILE]
--client-federated-token-file value the client-federated-token-file to use for authentication [$AZURE_FEDERATED_TOKEN_FILE]
--log-level value, -l value Log Level (default: "info") [$LOGLEVEL]
--log-caller log the caller (aka line number and file) (default: false)
--log-disable-color disable log coloring (default: false)
--log-full-timestamp force log output to always show full timestamp (default: false)
--help, -h show help (default: false)
```
Loading

0 comments on commit 2ff7f8d

Please # to comment.