File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,35 @@ resource "aws_route_table_association" "association_4" {
113113resource "aws_security_group" "sg_1" {
114114 name = " ${ var . prefix } -sg-1"
115115
116+ # HTTP 허용
116117 ingress {
117- from_port = 0
118- to_port = 0
119- protocol = " all "
118+ from_port = 80
119+ to_port = 80
120+ protocol = " tcp "
120121 cidr_blocks = [" 0.0.0.0/0" ]
121122 }
122123
124+ # HTTPS 허용
125+ ingress {
126+ from_port = 443
127+ to_port = 443
128+ protocol = " tcp"
129+ cidr_blocks = [" 0.0.0.0/0" ]
130+ }
131+
132+ # Nginx Proxy Manager 관리자 페이지
133+ ingress {
134+ from_port = 81
135+ to_port = 81
136+ protocol = " tcp"
137+ cidr_blocks = [" 0.0.0.0/0" ]
138+ }
139+
140+ # Egress - 외부로 나가는 트래픽은 허용 (패키지 다운로드, API 호출 등)
123141 egress {
124- from_port = 0
125- to_port = 0
126- protocol = " all "
142+ from_port = 0
143+ to_port = 0
144+ protocol = " -1 "
127145 cidr_blocks = [" 0.0.0.0/0" ]
128146 }
129147
You can’t perform that action at this time.
0 commit comments