forked from defenseunicorns/terraform-aws-bastion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocals.tf
31 lines (28 loc) · 849 Bytes
/
locals.tf
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
locals {
role_name = "${var.name}-role"
add_custom_policy_to_role = var.policy_content != null
sqs_queue_name = "${var.name}-s3-event-notification-queue"
# ssh access
keys_update_frequency = "*/5 * * * *"
enable_hourly_cron_updates = true
security_group_configs = [{
name = "${var.name}-sg"
description = "SG for ${var.name}"
vpc_id = var.vpc_id
ingress_rules = [{
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = var.allowed_public_ips # admin IPs or private IP (internal) of Software Defined Perimeter
description = "SSH access"
},
]
egress_rules = [{
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
description = "Allow all outbound traffic"
}]
}]
}