Skip to content

Commit

Permalink
Using Shell Code Blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Geoffrey Wiseman <geoffrey.wiseman@codiform.com>
  • Loading branch information
geoffreywiseman committed Jun 14, 2023
1 parent 6586b6d commit f74c953
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These are the most common operations. I'm going to use made-up ip addresses in

Often, I'll want to check if my current ip address is in a security group:

```bash
```shell
❯ awswl --sgid sg-0123456abc --list
The following CIDR blocks are authorized for SSH:
- 192.168.0.0/16
Expand All @@ -18,7 +18,7 @@ The following CIDR blocks are authorized for SSH:

These IP addresses are made up, but if my current external ip address were listed, it should be marked with `(current)`. This is what it would look like if I were in the list:

```bash
```shell
❯ awswl --sg-name "mycorp-prod-bastion" --list
The following CIDR blocks are authorized for SSH:
- 192.168.0.0/16
Expand All @@ -31,16 +31,19 @@ The following CIDR blocks are authorized for SSH:

If I want to give myself access to a security group, I could `--add-current`:

❯ awswl --sgid sg-0123456abc --add-current
Added current external IP address as a CIDR block (1.2.3.4/32) to allowlist.
```shell
❯ awswl --sgid sg-0123456abc --add-current
Added current external IP address as a CIDR block (1.2.3.4/32) to allowlist.
```

### Removing My Current External IP

If I'm working in an environment temporarily, I might want to revoke access as soon as I'm done, using `--remove-current`

❯ awswl --sg-name "myorg-jump-host" --remove-current
Removed current external IP address as a CIDR block (4.3.2.1/32) from allowlist.

```shell
❯ awswl --sg-name "myorg-jump-host" --remove-current
Removed current external IP address as a CIDR block (4.3.2.1/32) from allowlist.
```
### Adding or Removing a Custom CIDR

Although I usually want my current external ip address, there are certainly cases where you might want to allow-list a custom CIDR block:
Expand Down

0 comments on commit f74c953

Please sign in to comment.