- First run
networking
Module to create aVPC
,2 Public Subnets
,2 Private Subnets
. - Now create a SSH-key to ssh into ec2 from
ssh-key
module.
- Use the
vpc_id
created in previous step to create Security Group in that VPC. - Now Run Secturity group module to create Security group to attach to Instance.
- Use
subnet_id
fromstep 1
andsecurity_group
fromstep 2
to create ASG. - Run
asg
module to createlaunch_template
andautoscaling_group
to launch instances.
- Run
alb
module to create atarget_group
,application_loadbalancer
&listener_rule
.
- Create a
route53_zone
fromroute53_zone
module. - Create a
route53_record
fromroute53_record
to point the ALB DNS Name.
- Use these Command to apply terraform manifest.
terraform init
terraform plan
terraform apply