-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecurity_groups.tf
More file actions
37 lines (32 loc) · 833 Bytes
/
security_groups.tf
File metadata and controls
37 lines (32 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
resource "aws_security_group" "app_runner" {
name = "app_runner"
description = "AppRunner Security Group"
vpc_id = data.aws_vpc.default.id
tags = {
Name = "AppRunner Security Group"
Type = "Private"
}
}
resource "aws_security_group_rule" "allow_https" {
security_group_id = aws_security_group.app_runner.id
type = "ingress"
cidr_blocks = [
"1.1.1.1"
]
from_port = 443
to_port = 443
protocol = "tcp"
description = "Allow HTTPS Inbound"
}
#tfsec:ignore:aws-ec2-no-public-egress-sgr
resource "aws_security_group_rule" "allow_egress" {
security_group_id = aws_security_group.app_runner.id
type = "egress"
cidr_blocks = [
"0.0.0.0/0"
]
from_port = -1
to_port = -1
protocol = "all"
description = "Allow all outbound"
}