-
-
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.
- Loading branch information
Cariad Eccleston
authored
Jan 23, 2021
1 parent
3809aeb
commit 9bf8d0e
Showing
10 changed files
with
111 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Overview | ||
|
||
- ⚙️ `wev` is configurable. [Configuration files](schema) are YAML dictionaries. | ||
- 🌍 `wev` is contextual. [Directories](directories) are significant. | ||
- 👩👩👧👧 `wev` is collaborative. Team and personal configuration [filenames](filenames) are significant. |
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
6 changes: 4 additions & 2 deletions
6
docs/examples/awsmfa.md → docs/examples/aws-mfa-on-command-line.md
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,69 @@ | ||
# Amazon Web Services named profile per project | ||
|
||
You're a freelance software developer. You have two directories to distinguish between your personal and client projects: | ||
|
||
- `~/code` for personal projects. | ||
- `~/client-foo` for client _foo_'s projects. | ||
|
||
You use Amazon Web Services for both personal and client projects, and you have AWS named profiles set up for each account you interact with: | ||
|
||
- The `personal` profile for your personal AWS account. | ||
- The `foo` profile for client _foo_'s AWS account. | ||
|
||
Right now, you need to remember to run `aws` with `--profile personal` or `--profile foo` depending on the project you're working on. | ||
|
||
However, `wev`'s contextual environment variables can manage that for you. | ||
|
||
1. Install `wev`: | ||
|
||
```bash | ||
pip3 install wev | ||
``` | ||
|
||
2. Create `~/code/wev.yml`: | ||
|
||
```yaml | ||
AWS_DEFAULT_PROFILE: | ||
plugin: | ||
id: wev-echo | ||
value: personal | ||
``` | ||
|
||
3. Create `~/client-foo/wev.yml`: | ||
|
||
```yaml | ||
AWS_DEFAULT_PROFILE: | ||
plugin: | ||
id: wev-echo | ||
value: foo | ||
``` | ||
|
||
4. Open a terminal and `cd` into `~/code`. Verify that the _personal_ named profile is used: | ||
|
||
```bash | ||
cd ~/code | ||
wev aws sts get-caller-identity | ||
``` | ||
|
||
```json | ||
{ | ||
"UserId": "000000000000", | ||
"Account": "000000000000", | ||
"Arn": "arn:aws:iam::000000000000:user/you" | ||
} | ||
``` | ||
|
||
4. Open a terminal and `cd` into `~/client-foo`. Verify that the _foo_ named profile is used: | ||
|
||
```bash | ||
cd ~/client-foo | ||
wev aws sts get-caller-identity | ||
``` | ||
|
||
```json | ||
{ | ||
"UserId": "111111111111", | ||
"Account": "111111111111", | ||
"Arn": "arn:aws:iam::111111111111:user/contractor" | ||
} | ||
``` |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# Introduction | ||
# Available plugins | ||
|
||
This isn't a comprehensive list of plugins for `wev`. Anyone can [create a plugin](/create-a-plugin). | ||
This isn't a comprehensive list of plugins for `wev`, since anyone can [create a plugin](/create-a-plugin) and publish it independently. | ||
|
||
## Adding your plugin to this list | ||
Notable plugins include: | ||
|
||
If you've built and published a plugin for `wev` then--first of all--_awesome!_ | ||
| Name | Description | | ||
|----------------------------------------------------------------------|-------------------------------------------------| | ||
| [wev-awscodeartifact](https://github.com/cariad/wev-awscodeartifact) | Amazon Web Services CodeArtifact authorisation | | ||
| [wev-awsmfa](https://github.com/cariad/wev-awsmfa) | Amazon Web Services multi-factor authentication | | ||
| [wev-echo](wev-echo) | Echos strings | | ||
|
||
Please [raise an issue](https://github.com/cariad/wev/issues/new) summarising your plugin and where I can find it, and we'll collaborate on the documentation and promotion. | ||
To submit your own plugin for inclusion in this list, send me a pull request for review and I'll take a look. And thanks! |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,90 +1,16 @@ | ||
# wev-echo | ||
|
||
## Overview | ||
|
||
`wev-echo` resolves to hard-coded values. | ||
|
||
## Installation | ||
|
||
`wev-echo` is bundled with `wev`. | ||
`wev-echo` is bundled with `wev` and so is always available without needing to be explicitly installed. | ||
|
||
## Configuration | ||
|
||
| Property | Required | Description | | ||
|-----------|----------|---------------------------------------------------------------------------------| | ||
| separator | ⨯ | Separator to insert between values when `value` is a list. Defaults to a space. | | ||
| value | ✔️ | Value to resolve to. String or list of strings. | | ||
| separator | | Separator to insert between values when `value` is a list. Defaults to a space. | | ||
| value | ✔ | Value to resolve to. String or list of strings. | | ||
|
||
## Examples | ||
|
||
### Amazon Web Services profile | ||
|
||
Say you're a freelance software developer. | ||
|
||
You have two directories on your develpment machine: | ||
|
||
- `~/code` for personal projects. | ||
- `~/client-foo` for client _foo_'s projects. | ||
|
||
Both of these projects use Amazon Web Services, and you use the `aws` application daily whether you're working on personal or client projects. | ||
|
||
You have AWS named profiles set up for each of these areas: | ||
|
||
- The `personal` profile holds credentials for your personal Amazon Web Services account. | ||
- The `foo` profile holds credentials for client _foo_'s Amazon Web Services account. | ||
|
||
Right now, you need to remember to run `aws` with `--profile personal` or `--profile foo` depending on the project you're working on. `wev` can help. | ||
|
||
1. Install `wev`: | ||
|
||
```bash | ||
pip3 install wev | ||
``` | ||
|
||
2. Create `~/code/wev.yml`: | ||
|
||
```yaml | ||
AWS_DEFAULT_PROFILE: | ||
plugin: | ||
id: wev-echo | ||
value: personal | ||
``` | ||
|
||
3. Create `~/client-foo/wev.yml`: | ||
|
||
```yaml | ||
AWS_DEFAULT_PROFILE: | ||
plugin: | ||
id: wev-echo | ||
value: foo | ||
``` | ||
|
||
4. Open a terminal and `cd` into `~/code`. Verify that the _personal_ named profile is used: | ||
|
||
```bash | ||
cd ~/code | ||
wev aws sts get-caller-identity | ||
``` | ||
|
||
```json | ||
{ | ||
"UserId": "000000000000", | ||
"Account": "000000000000", | ||
"Arn": "arn:aws:iam::000000000000:user/personal-you" | ||
} | ||
``` | ||
|
||
4. Open a terminal and `cd` into `~/client-foo`. Verify that the _foo_ named profile is used: | ||
|
||
```bash | ||
cd ~/client-foo | ||
wev aws sts get-caller-identity | ||
``` | ||
|
||
```json | ||
{ | ||
"UserId": "111111111111", | ||
"Account": "111111111111", | ||
"Arn": "arn:aws:iam::111111111111:user/professional-you" | ||
} | ||
``` | ||
- [Amazon Web Services named profile per project](/examples/aws-profile-per-project) |
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