From 1e2c4984fd855c4b9998c69fda409ddebf5118aa Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Thu, 27 Jan 2022 13:26:32 -0500 Subject: [PATCH] chore: add "howto" section that will be ejected --- README.md | 21 +++++++++++++++++++++ eject.sh | 3 +++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index f137f38..a2739e5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,27 @@ Terraform module which creates AWS resources. + +## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 + +After creating a new repository from the template and cloning locally: + +```bash +./eject.sh +``` + +Where `` can be extracted from the repository name using the pattern `terraform-aws-`. + +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! + +## 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 + ## Usage See [`examples`](https://github.com/clowdhaus/terraform-aws-/tree/main/examples) directory for working examples to reference: diff --git a/eject.sh b/eject.sh index ff90648..d7ff1f5 100755 --- a/eject.sh +++ b/eject.sh @@ -14,4 +14,7 @@ rg '' --files-with-matches -t md -t tf | xargs sed -i "s//${MODULE}/ rg '' --files-with-matches -t md -t tf | xargs sed -i "s//${MODULE_UNDER}/g" rg '' --files-with-matches -t md -t tf | xargs sed -i "s//${MODULE_EXPANDED}/g" +# Remove "howto" section on main README.md +sed -i '//d' README.md + rm ./eject.sh