Skip to content

Commit

Permalink
chore: add "howto" section that will be ejected
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Jan 27, 2022
1 parent f56dd7f commit 1e2c498
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Terraform module which creates AWS <TODO_EXPANDED> resources.

<!--START--->
## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

After creating a new repository from the template and cloning locally:

```bash
./eject.sh <module-name>
```

Where `<module-name>` can be extracted from the repository name using the pattern `terraform-aws-<module-name>`.

For example, if the repository name is `terraform-aws-s3-bucket`, then the module name is `s3-bucket` and the associated eject command is:

```bash
./eject.sh s3-bucket
```

Note: this message will self destruct upon ejection!

## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
<!---END--->
## Usage

See [`examples`](https://github.com/clowdhaus/terraform-aws-<TODO>/tree/main/examples) directory for working examples to reference:
Expand Down
3 changes: 3 additions & 0 deletions eject.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ rg '<TODO>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO>/${MODULE}/
rg '<TODO_UNDER>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO_UNDER>/${MODULE_UNDER}/g"
rg '<TODO_EXPANDED>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO_EXPANDED>/${MODULE_EXPANDED}/g"

# Remove "howto" section on main README.md
sed -i '/<!--START/,/END--->/d' README.md

rm ./eject.sh

0 comments on commit 1e2c498

Please sign in to comment.