Skip to content

Commit

Permalink
mkdocs.yml: Add Basic Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelNdeCarvalho committed Oct 6, 2022
1 parent ba64cce commit 2510c67
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
93 changes: 93 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Basic Usage

In this section we quickly cover the basic commands of **Terrabutler**.
The usage of it can always be seen by using the help menu inside of every
command or subcommand.

Example:

``` shell
terrabutler tf -site inception apply --help
```

The command above shows all the arguments and options that can be used when
running that command.

## Usage

``` shell
terrabutler [global options] command [subcommand] [arguments] [options]
```

## Global options

All global options can be placed at the command level.

* `--help`, `-help`, `-h`: Show help menu.
* `--version`, `-version`: Show version of **Terrabutler**.

## Commands

The commands are:

- `env`: Manage environments
- `init`: Initialize the manager
- `tf`: Manage terraform commands

### Command `env`

Subcommands:

- `delete`: "Delete an environment"
- `list`: "List environments"
- `new`: "Create a new environment"
- `select`: "Select a environment"
- `show`: "Show the name of the current environment"

Example:

``` shell
terrabutler env select staging
```
The command above change the current environment to `staging`.
### Command `tf`
???+ tip
The `tf` subcommands are the Terraform commands
Subcommands:
- `apply`: "Create or update infrastructure"
- `console`: "Try Terraform expressions at an interactive command..."
- `destroy`: "Prepare your working directory for other commands"
- `fmt`: "Reformat your configuration in the standardstyle"
- `force-unlock`: "Release a stuck lock on the current workspace"
- `generate-options`: "Generate terraform options"
- `import`: "Associate existing infrastructure with a Terraform..."
- `init`: "Prepare your working directory for other commands"
- `output`: "Show output values from your root module"
- `plan`: "Show changes required by the current configuration"
- `providers`: "Show the providers required for this configuration"
- `refresh`: "Update the state to match remote systems"
- `show`: "Show the current state or a saved plan"
- `state`: "Advanced state management"
- `taint`: "Mark a resource instance as not fully functional"
- `untaint`: "Remove the 'tainted' state from a resource instance"
- `validate`: "Validate the configuration files"
- `version`: "Show the current Terraform version"
Example:
``` shell
terrabutler tf -site inception apply
```
The command above run a `terraform apply` command inside the `site inception` in
the current environment.
### Command `init`
Has no subcommands
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ nav:
- Philosophy: philosophy.md
- Requirements: requirements.md
- Installation: installation.md
- Basic Usage: usage.md

0 comments on commit 2510c67

Please sign in to comment.