This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example single-node-asg-tester: Add Makefile/README
- Loading branch information
1 parent
1b5b03a
commit b98b93b
Showing
3 changed files
with
63 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.PHONY: init ssh-key apply destroy clean | ||
|
||
.DEFAULT_GOAL = help | ||
|
||
## Runs terraform get and terraform init for env | ||
init: | ||
@terraform get | ||
@terraform init | ||
|
||
## Create ssh key | ||
ssh-key: | ||
@ssh-keygen -q -N "" -C "SSH key for vpc-scenario-1 example" -f ./id_rsa | ||
|
||
## use 'terraform apply' to apply the setup. | ||
apply: | ||
@terraform apply | ||
|
||
## use 'terraform destroy' to remove all resources from AWS | ||
destroy: | ||
@terraform destroy | ||
|
||
## rm -rf all files and state | ||
clean: | ||
@rm -f id_rsa | ||
@rm -f id_rsa.pub | ||
@rm -f terraform.*.backup | ||
@rm -f terraform.tfstate | ||
|
||
## Show help screen. | ||
help: | ||
@echo "Please use \`make <target>' where <target> is one of\n\n" | ||
@awk '/^[a-zA-Z\-\_0-9]+:/ { \ | ||
helpMessage = match(lastLine, /^## (.*)/); \ | ||
if (helpMessage) { \ | ||
helpCommand = substr($$1, 0, index($$1, ":")-1); \ | ||
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ | ||
printf "%-30s %s\n", helpCommand, helpMessage; \ | ||
} \ | ||
} \ | ||
{ lastLine = $$0 }' $(MAKEFILE_LIST) |
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 @@ | ||
# single node asg tester | ||
|
||
This example shows the basic usage of `single-node-asg` module, especially the multiple EBS attachments. | ||
|
||
The module keeps one and only one instance up at all time. And the EBS volumes are reattached when a new instance is up. Hence they are always accessible. |
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