Skip to content

Latest commit

 

History

History
88 lines (71 loc) · 6.88 KB

README.md

File metadata and controls

88 lines (71 loc) · 6.88 KB

Instances Module

This module will create the EC2 instances and all the resources related to it.

Resource Type Description
Bastion Server EC2 Instance This is the bastion server that will be used to connect to the private instances
Private Instances EC2 Instance We will create one instance per private subnet available
Application Load Balancer ALB This is the load balancer that will be used to distribute the traffic to the private instances
Target Group ALB Target Group This is the target group that will be used to register the private instances
SSH Key Pair Key Pair This is the key pair that will be used to connect to all the instances
Bastion SSH SG Security Group This is the security group that will be used to allow the SSH traffic to the bastion server
Private Instances SSH SG Security Group This is the security group that will be used to allow the traffic from the bastion server to the private instances
ALB SG Security Group This is the security group that will be used to allow the traffic from the internet to the ALB
Private Instances HTTP SG Security Group This is the security group that will be used to allow the traffic from the ALB to the private instances

Providers

Name Version
aws ~> 5.0.1
http ~> 3.3.0
random n/a
tls ~> 4.0.1

Requirements

Name Version
aws ~> 5.0.1
http ~> 3.3.0
tls ~> 4.0.1

Inputs

Name Description Type Default Required
Image Data from the Golden Image generated Manifest any n/a yes
Name Base name for the resources string n/a yes
Network Data from the Network module any n/a yes
Tags Tags to apply to the resources map(string) {} no
ami_filter_architecture Bastion Host: AMI architecture to use on the filter list(string)
[
"amd64"
]
no
ami_filter_name Bastion Host: AMI name to use on the filter list(string)
[
"ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
]
no
ami_filter_owners Bastion Host: AMI owners to use on the filter list(string)
[
"099720109477"
]
no
ami_filter_virtualization_type Bastion Host: AMI virtualization type to use on the filter list(string)
[
"hvm"
]
no
local_ip Local IP address to allow SSH access to the instances string "" no
vpc_id VPC ID to deploy the builder instance string "" no

Outputs

Name Description
Bastion_Host_IP_address Public IP address of the bastion host
Load_balancer_HTTP_DNS DNS name of the load balancer
Private_Instances_IP_addresses IP addresses of the private instances
SSH_key_Content Private SSH key content to connect to all the instances
Usernames Usernames to connect to all the instances

Resources

Name Type
aws_instance.bastion resource
aws_instance.private resource
aws_key_pair.this resource
aws_lb.alb resource
aws_lb_listener.alb_listener resource
aws_lb_listener_rule.alb_listener_rule resource
aws_lb_target_group.alb_target_group resource
aws_lb_target_group_attachment.alb_target_group_attachment resource
aws_security_group.alb_sg resource
aws_security_group.bastion_sg resource
aws_security_group.private_instances_sg resource
random_shuffle.azs resource
tls_private_key.pvt_cert resource
aws_ami.golden_image data source
aws_ami.ubuntu data source
aws_availability_zones.available data source
aws_region.current data source
aws_vpc.this data source
http_http.local_ip data source