-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
59 lines (50 loc) · 1.06 KB
/
main.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
provider "aws" {
version = "~> 1.7.0"
region = "${var.region}"
profile = "${var.profile}"
}
resource aws_ebs_volume zfs-volume {
availability_zone = "${var.availability-zone}"
size = 100
type = "gp2"
}
locals {
# filename for the public ssh key comes from the key name
public_key_filename = "${var.public_key_name}.pub"
}
resource aws_key_pair ssh-key {
key_name = "${var.public_key_name}"
public_key = "${file(local.public_key_filename)}"
}
data aws_vpc default {
default = true
}
resource aws_security_group poudriere {
name = "poudriere"
description = "Allow SSH/HTTP from the internet"
vpc_id = "${data.aws_vpc.default.id}"
ingress {
protocol = "tcp"
from_port = 22
to_port = 22
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
protocol = "tcp"
from_port = 22
to_port = 22
ipv6_cidr_blocks = ["::/0"]
}
ingress {
protocol = "tcp"
from_port = 80
to_port = 80
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
protocol = "tcp"
from_port = 80
to_port = 80
ipv6_cidr_blocks = ["::/0"]
}
}