-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganised docs to be easier to parse
Doc rehash
- Loading branch information
Showing
15 changed files
with
390 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
## Output Formats | ||
|
||
- [Output Formats](#output-formats) | ||
- [Table Output](#table-output) | ||
- [Json Output](#json-output) | ||
- [CSV Output](#csv-output) | ||
- [Markdown Output](#markdown-output) | ||
- [HTML Output](#html-output) | ||
|
||
|
||
### Table Output | ||
A table is the default format when outputting information about hava sources | ||
|
||
```bash | ||
hava source list | ||
╭───┬───────────────┬──────────────────────────────────────┬──────────────────────┬───────────────┬────────┬─────────────────────────────────────────╮ | ||
│ │ DISPLAYNAME │ ID │ INFO │ NAME │ STATE │ TYPE │ | ||
├───┼───────────────┼──────────────────────────────────────┼──────────────────────┼───────────────┼────────┼─────────────────────────────────────────┤ | ||
│ 1 │ dev │ 4f14c115-3b0d-40ea-b075-6df9b2fb81c9 │ AKIAIOSFODNN7EXAMPLE │ dev │ active │ Sources::AWS::Keys │ | ||
│ 2 │ GCPDevChange3 │ f2a26440-10bf-43d1-9742-8361de30590f │ credentials.json │ GCPDevChange3 │ active │ Sources::GCP::ServiceAccountCredentials │ | ||
╰───┴───────────────┴──────────────────────────────────────┴──────────────────────┴───────────────┴────────┴─────────────────────────────────────────╯ | ||
``` | ||
|
||
### Json Output | ||
|
||
|
||
```bash | ||
hava source list --json | jq | ||
[ | ||
{ | ||
"DisplayName": "dev", | ||
"Id": "4f14c115-3b0d-40ea-b075-6df9b2fb81c9", | ||
"Info": "AKIAIOSFODNN7EXAMPLE", | ||
"Name": "dev", | ||
"State": "active", | ||
"Type": "Sources::AWS::Keys" | ||
}, | ||
{ | ||
"DisplayName": "GCPDevChange3", | ||
"Id": "f2a26440-10bf-43d1-9742-8361de30590f", | ||
"Info": "credentials.json", | ||
"Name": "GCPDevChange3", | ||
"State": "active", | ||
"Type": "Sources::GCP::ServiceAccountCredentials" | ||
} | ||
] | ||
``` | ||
|
||
### CSV Output | ||
|
||
```bash | ||
hava source list --csv | ||
,DisplayName,Id,Info,Name,State,Type | ||
1,dev,4f14c115-3b0d-40ea-b075-6df9b2fb81c9,AKIAIOSFODNN7EXAMPLE,dev,active,Sources::AWS::Keys | ||
2,GCPDevChange3,f2a26440-10bf-43d1-9742-8361de30590f,credentials.json,GCPDevChange3,active,Sources::GCP::ServiceAccountCredentials | ||
``` | ||
|
||
|
||
### Markdown Output | ||
|
||
```bash | ||
hava source list --markdown | ||
| | DisplayName | Id | Info | Name | State | Type | | ||
| ---:| --- | --- | --- | --- | --- | --- | | ||
| 1 | dev | 4f14c115-3b0d-40ea-b075-6df9b2fb81c9 | AKIAIOSFODNN7EXAMPLE | dev | active | Sources::AWS::Keys | | ||
| 2 | GCPDevChange3 | f2a26440-10bf-43d1-9742-8361de30590f | credentials.json | GCPDevChange3 | active | Sources::GCP::ServiceAccountCredentials | | ||
``` | ||
|
||
|
||
### HTML Output | ||
|
||
``` | ||
hava source list --html | ||
<table class="go-pretty-table"> | ||
<thead> | ||
<tr> | ||
<th> </th> | ||
<th>DisplayName</th> | ||
<th>Id</th> | ||
<th>Info</th> | ||
<th>Name</th> | ||
<th>State</th> | ||
<th>Type</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td align="right">1</td> | ||
<td>appGCP</td> | ||
<td>09409035-87d4-478b-bec0-25349825d390</td> | ||
<td>credentials.json</td> | ||
<td>appGCP</td> | ||
<td>active</td> | ||
<td>Sources::GCP::ServiceAccountCredentials</td> | ||
</tr> | ||
<tr> | ||
<td align="right">2</td> | ||
<td>devTestAWS</td> | ||
<td>a2d8d0c8-0fd4-4483-ab2a-71e4ef58e093</td> | ||
<td>AKIAIOSFODNN7EXAMPLE</td> | ||
<td>devTestAWS</td> | ||
<td>active</td> | ||
<td>Sources::AWS::Keys</td> | ||
</tr> | ||
<tr> | ||
<td align="right">3</td> | ||
<td>devTestAWScar</td> | ||
<td>c3b9d2d7-0cb1-4fd1-92d7-beed7ceb7b22</td> | ||
<td>arn:aws:iam::777777777777:role/HavaCAR</td> | ||
<td>devTestAWScar</td> | ||
<td>active</td> | ||
<td>Sources::AWS::CrossAccountRole</td> | ||
</tr> | ||
<tr> | ||
<td align="right">4</td> | ||
<td>devTestAzure</td> | ||
<td>76903928-8ae0-4ccb-8dee-ede61db9dc5c</td> | ||
<td>uPfVzmPStDe9ya</td> | ||
<td>devTestAzure</td> | ||
<td>inactive</td> | ||
<td>Sources::Azure::Credentials</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Source Commands | ||
|
||
- [Source Commands](#source-commands) | ||
- [Source List all](#source-list-all) | ||
- [Source List SourceID](#source-list-sourceid) | ||
- [Source Sync SourceID](#source-sync-sourceid) | ||
- [Source Create AWS (Using Access Keys)](#source-create-aws-using-access-keys) | ||
- [Source Create AWS (Using Cross Account Role)](#source-create-aws-using-cross-account-role) | ||
- [Source Create GCP](#source-create-gcp) | ||
- [Source Create Azure](#source-create-azure) | ||
- [Source Delete](#source-delete) | ||
- [Source Update AWS|AZURE|GCP](#source-update-awsazuregcp) | ||
|
||
|
||
`hava source -h` | ||
|
||
```bash | ||
Create/List/Delete/Update sources to Hava for different providers (AWS/Azure/Google Cloud) | ||
|
||
Usage: | ||
hava source [flags] | ||
hava source [command] | ||
|
||
Available Commands: | ||
create Create sources to Hava | ||
delete Delete sources to Hava | ||
list List sources of Hava | ||
sync Sync sources to Hava | ||
update Update sources to Hava | ||
|
||
Flags: | ||
--all hava source --all | ||
-h, --help help for source | ||
--sourceId string sourceId of AWS|Azure|GCP source | ||
``` | ||
|
||
## Source List all | ||
|
||
`hava source list` | ||
|
||
``` | ||
╭───┬─────────────┬──────────────────────────────────────┬──────────────────────┬────────────┬────────┬────────────────────╮ | ||
│ │ DISPLAYNAME │ ID │ INFO │ NAME │ STATE │ TYPE │ | ||
├───┼─────────────┼──────────────────────────────────────┼──────────────────────┼────────────┼────────┼────────────────────┤ | ||
│ 1 │ devTestAWS │ 8eb192e2-9beb-466b-ae14-c05fc8403cf4 │ AKIAIOSFODNN7EXAMPLE │ devTestAWS │ active │ Sources::AWS::Keys │ | ||
╰───┴─────────────┴──────────────────────────────────────┴──────────────────────┴────────────┴────────┴────────────────────╯ | ||
``` | ||
|
||
## Source List SourceID | ||
|
||
`hava source list --source-id a58b7cb1-f9da-42ad-9fc1-8dc61b0d3e38` | ||
|
||
|
||
## Source Sync SourceID | ||
|
||
`hava source sync a58b7cb1-f9da-42ad-9fc1-8dc61b0d3e38` | ||
|
||
|
||
## Source Create AWS (Using Access Keys) | ||
|
||
`hava source create aws --name dev --access-key $AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY` | ||
|
||
```bash | ||
[INFO] Created AWS Source for the following source: | ||
|
||
╭───┬─────────────┬──────────────────────────────────────┬──────────────────────┬────────────┬────────┬────────────────────╮ | ||
│ │ DISPLAYNAME │ ID │ INFO │ NAME │ STATE │ TYPE │ | ||
├───┼─────────────┼──────────────────────────────────────┼──────────────────────┼────────────┼────────┼────────────────────┤ | ||
│ 1 │ devTestAWS │ 040d5b5e-03b9-4343-9393-8ad0794512f4 │ AKIAIOSFODNN7EXAMPLE │ devTestAWS │ queued │ Sources::AWS::Keys │ | ||
╰───┴─────────────┴──────────────────────────────────────┴──────────────────────┴────────────┴────────┴────────────────────╯ | ||
``` | ||
|
||
## Source Create AWS (Using Cross Account Role) | ||
|
||
`hava source create aws --name devCAR --role-arn $AWS_CROSS_ACCOUNT_ROLE` | ||
|
||
```bash | ||
[INFO] Created AWS Source for the following source: | ||
|
||
╭───┬─────────────┬──────────────────────────────────────┬────────────────────────────────────────┬────────┬────────┬────────────────────────────────╮ | ||
│ │ DISPLAYNAME │ ID │ INFO │ NAME │ STATE │ TYPE │ | ||
├───┼─────────────┼──────────────────────────────────────┼────────────────────────────────────────┼────────┼────────┼────────────────────────────────┤ | ||
│ 1 │ devCAR │ 31f9b6a6-4e48-400a-8ced-5bfc2a1aacc2 │ arn:aws:iam::123456789012:role/HavaCAR │ devCAR │ queued │ Sources::AWS::CrossAccountRole │ | ||
╰───┴─────────────┴──────────────────────────────────────┴────────────────────────────────────────┴────────┴────────┴────────────────────────────────╯ | ||
``` | ||
|
||
## Source Create GCP | ||
|
||
`hava source create gcp --name GCPDev --configFile $GCP_ENCODED_FILE` | ||
|
||
```bash | ||
[INFO] Created GCP Source for the following source: | ||
|
||
╭───┬─────────────┬──────────────────────────────────────┬──────────────────┬────────┬────────┬─────────────────────────────────────────╮ | ||
│ │ DISPLAYNAME │ ID │ INFO │ NAME │ STATE │ TYPE │ | ||
├───┼─────────────┼──────────────────────────────────────┼──────────────────┼────────┼────────┼─────────────────────────────────────────┤ | ||
│ 1 │ GCPDev │ 8818d864-46e9-4b8d-acdd-a31d8936e62f │ credentials.json │ GCPDev │ queued │ Sources::GCP::ServiceAccountCredentials │ | ||
╰───┴─────────────┴──────────────────────────────────────┴──────────────────┴────────┴────────┴─────────────────────────────────────────╯ | ||
``` | ||
|
||
## Source Create Azure | ||
|
||
`hava create source azure --name AzureDev --client-id $ARM_CLIENT_ID --tenant-id $ARM_TENANT_ID --subscription-id $ARM_SUBSCRIPTION_ID` | ||
|
||
|
||
## Source Delete | ||
|
||
`hava source delete 22872411-20e8-4b6e-aa46-41866c9c1897` | ||
|
||
![hava_delete_sources](./images/hava_source_delete.cast.gif) | ||
|
||
|
||
## Source Update AWS|AZURE|GCP | ||
|
||
`hava source update gcp --name GCPDevChange --source-id f2a26440-10bf-43d1-9742-8361de30590f` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
## Usage | ||
- [Usage](#usage) | ||
- [Print hava CLI help](#print-hava-cli-help) | ||
- [Create and List Sources](#create-and-list-sources) | ||
- [CLI JSON Output](#cli-json-output) | ||
- [Sync Sources](#sync-sources) | ||
- [Delete Sources](#delete-sources) | ||
- [CLI Completion Setup](#cli-completion-setup) | ||
- [CLI Interactive Config Setup](#cli-interactive-config-setup) | ||
|
||
### Print hava CLI help | ||
|
||
![print help](./images/hava_help.cast.gif) | ||
|
||
|
||
`hava -h` | ||
|
||
```bash | ||
A CLI to interface with the Hava platform. | ||
|
||
Hava CLI empowers engineers the ability to automate and interact | ||
with the Hava platform. | ||
|
||
Usage: | ||
hava [command] | ||
|
||
Available Commands: | ||
completion Generate the autocompletion script for the specified shell | ||
help Help about any command | ||
source Create/List/Delete/Update sources to Hava | ||
|
||
Flags: | ||
--autoapprove Auto approve the hava command. --autoapprove, false by default | ||
-h, --help help for hava | ||
-v, --version version for hava | ||
|
||
Use "hava [command] --help" for more information about a command. | ||
``` | ||
|
||
### Create and List Sources | ||
|
||
![hava_create_list](./images/hava_create_list_sources.cast.gif) | ||
|
||
### CLI JSON Output | ||
|
||
![hava_json_out](./images/hava_CLI_json_output.cast.gif) | ||
|
||
|
||
### Sync Sources | ||
|
||
![hava_print_source](./images/hava_source_sync.cast.gif) | ||
|
||
### Delete Sources | ||
|
||
![hava_delete_sources](./images/hava_source_delete.cast.gif) | ||
|
||
### CLI Completion Setup | ||
|
||
![hava_cli_completion](./images/hava_cli_completion.cast.gif) | ||
|
||
### CLI Interactive Config Setup | ||
|
||
The following will trigger when no `HAVA_TOKEN` found as an environment variable AND Config file found AND `AUTOMATION=1` is not set. | ||
|
||
![hava_config_setup](./images/hava_config_setup.cast.gif) |