This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve EC2 tagging and documentation
- Loading branch information
1 parent
55d042d
commit f20badc
Showing
3 changed files
with
78 additions
and
17 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,17 @@ | ||
# Deploy private AWS app | ||
|
||
This example launches an Auto-Scaling group and runs multiple dockers app inside each machine. | ||
|
||
## Deployment | ||
|
||
setup: | ||
``` | ||
terraform init; terraform apply --auto-approve | ||
``` | ||
|
||
teardown: | ||
``` | ||
terraform init; terraform destroy --auto-approve | ||
``` | ||
|
||
|
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,19 +1,49 @@ | ||
module "asg" { | ||
// You can call the module 'asg' whatever you want | ||
// This block uses the module from two directories above | ||
module "asg-local" { | ||
source = "../../" | ||
|
||
aws-profile = "ds-web-products-staging" | ||
aws-region = "eu-west-3" | ||
instance-ami = "ami-0dd7e7ed60da8fb83" | ||
user-data-script = "./user-data.sh" | ||
asg-min-size = "2" | ||
asg-max-size = "4" | ||
asg-def-size = "2" | ||
alb-name = "rafa-ian-alb" | ||
placement-group-name = "rafa-ian-pg" | ||
target-group-name = "rafa-ian-tg" | ||
asg-name = "rafa-ian-asg" | ||
launch-config-name = "rafa-ian-lc" | ||
instance-associate-public-ip = "true" | ||
iam-role-name = "engage-ECR-read" | ||
ssh-allowed-ips = ["62.255.97.196/32", "62.6.58.84/32"] | ||
aws-profile = "ds-web-products-staging" | ||
aws-region = "eu-west-3" | ||
instance-ami = "ami-0dd7e7ed60da8fb83" | ||
user-data-script = "./user-data.sh" | ||
asg-min-size = "2" | ||
asg-max-size = "4" | ||
asg-def-size = "2" | ||
alb-name = "rafa-lizzie-alb" | ||
instance-key-name = "engage-paris-key" | ||
instance-type = "t2.medium" | ||
instance-tag-name = "AMP-app-ec2-instance" | ||
placement-group-name = "rafa-lizzie-pg" | ||
target-group-name = "rafa-lizzie-tg" | ||
asg-name = "rafa-lizzie-asg" | ||
launch-config-name = "rafa-lizzie-lc" | ||
iam-role-name = "engage-ECR-read" | ||
ssh-allowed-ips = ["62.255.97.196/32", "62.255.97.197/32"] | ||
} | ||
|
||
// This is the exact same block, | ||
// but uses the module from the terraform registry | ||
|
||
# module "asg-registry" { | ||
# source = "EconomistDigitalSolutions/asg/aws" | ||
# version = "1.0.4" | ||
|
||
# aws-profile = "ds-web-products-staging" | ||
# aws-region = "eu-west-3" | ||
# instance-ami = "ami-0dd7e7ed60da8fb83" | ||
# user-data-script = "./user-data.sh" | ||
# asg-min-size = "2" | ||
# asg-max-size = "4" | ||
# asg-def-size = "2" | ||
# alb-name = "rafa-lizzie-alb" | ||
# instance-key-name = "engage-paris-key" | ||
# instance-type = "t2.medium" | ||
# instance-tag-name = "AMP-app-ec2-instance" | ||
# placement-group-name = "rafa-lizzie-pg" | ||
# target-group-name = "rafa-lizzie-tg" | ||
# asg-name = "rafa-lizzie-asg" | ||
# launch-config-name = "rafa-lizzie-lc" | ||
# iam-role-name = "engage-ECR-read" | ||
# ssh-allowed-ips = ["62.255.97.196/32", "62.255.97.197/32"] | ||
# } |