Skip to content

Terraform module that creates a web backend with an RDS database, ASG of EC2 instances, an ALB for load balancing, and related resources.

License

Notifications You must be signed in to change notification settings

gretchenleighmiller/terraform-aws-ec2-web-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

Name Source Version
alb terraform-aws-modules/alb/aws n/a
asg terraform-aws-modules/autoscaling/aws n/a
cert terraform-aws-modules/acm/aws n/a
rds terraform-aws-modules/rds/aws n/a

Resources

Name Type
aws_route53_record.a resource
aws_security_group.alb_sg resource
aws_security_group.asg_sg resource
aws_security_group.db_sg resource
aws_security_group_rule.alb_egress resource
aws_security_group_rule.alb_http_ingress resource
aws_security_group_rule.alb_https_ingress resource
aws_security_group_rule.asg_egress resource
aws_security_group_rule.asg_http_ingress resource
aws_security_group_rule.asg_ssh_ingress resource
aws_security_group_rule.db_egress resource
aws_security_group_rule.db_ingress resource

Inputs

Name Description Type Default Required
ami_id The ID of the ASG instance AMI. string n/a yes
asg_desired_capacity The desired number of instances in the ASG. number 1 no
asg_instance_profile_name The name of the instance profile attached to instances in the ASG. string n/a yes
asg_instance_type The instance type of instances in the ASG. string "t3.micro" no
asg_max_size The maximum number of instances in the ASG. number 1 no
asg_min_size The minimum number of instances in the ASG. number 1 no
asg_user_data_template The template file used to generate user data injected into the instances in the ASG. string n/a yes
bastion_sg_id The ID of the bastion Security Group. string n/a yes
database_subnet_ids A list of IDs of database subnets into which the database is placed. list(string) n/a yes
fqdn The FQDN of the web backend. string n/a yes
name The name of the web backend. string n/a yes
private_subnet_ids A list of IDs of private subnets into which ASG instances are placed. list(string) n/a yes
public_subnet_ids A list of IDs of public subnets into which the ALB is placed. list(string) n/a yes
rds_allocated_storage The amount of storage allocated (in GB) for the RDS instance. number 10 no
rds_backup_retention_period The number of days for which backups of the RDS instance are retained. number 7 no
rds_backup_window The backup window for the RDS instance. string "03:00-06:00" no
rds_db_name The name of the database in the RDS instance. string n/a yes
rds_engine The database engine of the RDS instance. string "postgres" no
rds_engine_version The version of the database engine of the RDS instance. string "14.6" no
rds_family The family of the database engine of the RDS instance. string "postgres14" no
rds_instance_class The instance class of the RDS instance. string "db.t3.micro" no
rds_maintenance_window The maintenance window for the RDS instance. string "Mon:00:00-Mon:03:00" no
rds_major_engine_version The major version of the database engine of the RDS instance. string "14" no
rds_password The password of the user in the RDS instance. string n/a yes
rds_port The port on which RDS is made available. string "5432" no
rds_username The name of the user in the RDS instance. string n/a yes
route53_zone_id The Route 53 Zone ID. string n/a yes
subject_alternative_names A list of subject alternative names. list(string) [] no
vpc_id The ID of the VPC into which the web backend is placed. string n/a yes

Outputs

Name Description
alb_arn The ARN of the ALB.
alb_arn_suffix The ARN suffix of the ALB.
alb_dns_name The DNS name of the ALB.
alb_id The ID of the ALB.
alb_sg_id The ID of the ALB Security Group.
asg_arn The ARN of the ASG.
asg_id The ID of the ASG.
asg_name The name of the ASG.
asg_sg_id The ID of the ASG Security Group.
db_arn The ARN of the RDS instance.
db_az The availability zone of the RDS instance.
db_host The host of the RDS instance.
db_id The ID of the RDS instance.
db_sg_id The ID of the database Security Group.

About

Terraform module that creates a web backend with an RDS database, ASG of EC2 instances, an ALB for load balancing, and related resources.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages