Skip to content

Commit 1e2c498

Browse files
committed
chore: add "howto" section that will be ejected
1 parent f56dd7f commit 1e2c498

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
Terraform module which creates AWS <TODO_EXPANDED> resources.
44

5+
<!--START--->
6+
## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
7+
8+
After creating a new repository from the template and cloning locally:
9+
10+
```bash
11+
./eject.sh <module-name>
12+
```
13+
14+
Where `<module-name>` can be extracted from the repository name using the pattern `terraform-aws-<module-name>`.
15+
16+
For example, if the repository name is `terraform-aws-s3-bucket`, then the module name is `s3-bucket` and the associated eject command is:
17+
18+
```bash
19+
./eject.sh s3-bucket
20+
```
21+
22+
Note: this message will self destruct upon ejection!
23+
24+
## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
25+
<!---END--->
526
## Usage
627

728
See [`examples`](https://github.com/clowdhaus/terraform-aws-<TODO>/tree/main/examples) directory for working examples to reference:

eject.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ rg '<TODO>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO>/${MODULE}/
1414
rg '<TODO_UNDER>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO_UNDER>/${MODULE_UNDER}/g"
1515
rg '<TODO_EXPANDED>' --files-with-matches -t md -t tf | xargs sed -i "s/<TODO_EXPANDED>/${MODULE_EXPANDED}/g"
1616

17+
# Remove "howto" section on main README.md
18+
sed -i '/<!--START/,/END--->/d' README.md
19+
1720
rm ./eject.sh

0 commit comments

Comments
 (0)