forked from WesleyCharlesBlake/terraform-aws-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bastion.tf
42 lines (36 loc) · 1.13 KB
/
bastion.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
32
33
34
35
36
37
38
39
40
41
42
### bastion
### bastion hosts
module "bastion-asg" {
source = "terraform-aws-modules/autoscaling/aws"
version = "~> 3.0"
name = "${var.cluster-name}-bastion"
lc_name = "${var.cluster-name}-bastion-lc"
image_id = data.aws_ami.bastion.id
instance_type = "t2.small"
security_groups = [data.aws_security_group.bastion.id]
associate_public_ip_address = true
recreate_asg_when_lc_changes = true
root_block_device = [
{
volume_size = "10"
volume_type = "gp2"
delete_on_termination = true
},
]
# Auto scaling group
asg_name = "${var.cluster-name}-bastion"
vpc_zone_identifier = data.aws_subnet_ids.public.ids
health_check_type = "EC2"
min_size = 1
max_size = 1
desired_capacity = 1
wait_for_capacity_timeout = 0
key_name = aws_key_pair.deployer.key_name
tags = [
{
key = "kubernetes.io/cluster/${var.cluster-name}"
value = "owned"
propagate_at_launch = true
}
]
}