forked from blue-harvest/terraform-aws-blueharvest-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_bastion-instance.tf.txt
More file actions
35 lines (30 loc) · 898 Bytes
/
example_bastion-instance.tf.txt
File metadata and controls
35 lines (30 loc) · 898 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
resource "aws_instance" "mutanthost-eks-bastion" {
key_name = "${aws_key_pair.mutanthost-eks.key_name}"
vpc_security_group_ids = ["${aws_security_group.mutanthost-eks-bastion.id}"]
availability_zone = "${var.availability_zones[0]}"
subnet_id = "${module.vpc.public_subnets[0]}"
ami = "${data.aws_ami.ubuntu.id}"
instance_type = "t3.micro"
tags {
Name = "${var.cluster_name}-bastion"
}
}
resource "aws_security_group" "mutanthost-eks-bastion" {
vpc_id = "${module.vpc.vpc_id}"
name = "${var.cluster_name}-bastion"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags {
Name = "${var.cluster_name}-bastion"
}
}