This repository was archived by the owner on Nov 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ resource "aws_security_group" "allow_ptfe" {
5252 cidr_blocks = [" 0.0.0.0/0" ]
5353 }
5454
55+ ingress {
56+ description = " http to ptfe application"
57+
58+ protocol = " tcp"
59+ from_port = 80
60+ to_port = 80
61+
62+ cidr_blocks = [" 0.0.0.0/0" ]
63+ }
64+
5565 ingress {
5666 description = " https to ptfe application"
5767
Original file line number Diff line number Diff line change @@ -37,6 +37,22 @@ resource "aws_lb_target_group" "admin" {
3737 }
3838}
3939
40+ resource "aws_lb_listener" "http" {
41+ load_balancer_arn = " ${ aws_lb . ptfe . arn } "
42+ port = " 80"
43+ protocol = " HTTP"
44+
45+ default_action {
46+ type = " redirect"
47+
48+ redirect {
49+ port = " 443"
50+ protocol = " HTTPS"
51+ status_code = " HTTP_301"
52+ }
53+ }
54+ }
55+
4056resource "aws_lb_listener" "https" {
4157 load_balancer_arn = " ${ aws_lb . ptfe . arn } "
4258 port = " 443"
Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ resource "aws_security_group" "lb_public" {
3939 cidr_blocks = [" 0.0.0.0/0" ]
4040 }
4141
42+ ingress {
43+ description = " http to ptfe application"
44+ protocol = " tcp"
45+ from_port = 80
46+ to_port = 80
47+ cidr_blocks = [" 0.0.0.0/0" ]
48+ }
49+
4250 ingress {
4351 description = " https to ptfe application"
4452 protocol = " tcp"
You can’t perform that action at this time.
0 commit comments