moved images to s3 and added terraform scripts
This commit is contained in:
55
infra/terraform/modules/catherine-fc/main/security-group.tf
Normal file
55
infra/terraform/modules/catherine-fc/main/security-group.tf
Normal file
@@ -0,0 +1,55 @@
|
||||
resource "aws_security_group" "catherine_fc_asg_sg" {
|
||||
description = "catherine fc security group"
|
||||
vpc_id = var.vpc_id
|
||||
tags = var.tags
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "catherine_fc_asg_sg_ingress" {
|
||||
description = "lb security group"
|
||||
type = "ingress"
|
||||
from_port = 8080
|
||||
to_port = 8080
|
||||
protocol = "tcp"
|
||||
cidr_blocks = [ "0.0.0.0/0" ]
|
||||
|
||||
security_group_id = aws_security_group.catherine_fc_asg_sg.id
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "catherine_fc_asg_sg_allow_egress" {
|
||||
description = "allow all"
|
||||
type = "egress"
|
||||
protocol = "all"
|
||||
from_port = 0
|
||||
to_port = 65535
|
||||
cidr_blocks = [ "0.0.0.0/0" ]
|
||||
|
||||
security_group_id = aws_security_group.catherine_fc_asg_sg.id
|
||||
}
|
||||
|
||||
resource "aws_security_group" "catherine_fc_lb_sg" {
|
||||
description = "catherine fc security group for load balancer"
|
||||
vpc_id = var.vpc_id
|
||||
tags = var.tags
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "catherine_fc_alb_sg_ingress" {
|
||||
description = "alb security group"
|
||||
type = "ingress"
|
||||
from_port = 443
|
||||
to_port = 443
|
||||
protocol = "tcp"
|
||||
cidr_blocks = [ "0.0.0.0/0" ]
|
||||
|
||||
security_group_id = aws_security_group.catherine_fc_lb_sg.id
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "catherine_fc_asg_sg_allow_egress" {
|
||||
description = "allow all"
|
||||
type = "egress"
|
||||
protocol = "all"
|
||||
from_port = 0
|
||||
to_port = 65535
|
||||
cidr_blocks = [ "0.0.0.0/0" ]
|
||||
|
||||
security_group_id = aws_security_group.catherine_fc_lb_sg.id
|
||||
}
|
||||
Reference in New Issue
Block a user