This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
confluence.tf
86 lines (77 loc) · 2.85 KB
/
confluence.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
resource "aws_security_group" "mcws-confluence-public-ec2-sg" {
provider = "aws.us-east-2"
name = "mcws-confluence-public-ec2-sg"
description = "MCWS Confluence public SG"
}
resource "aws_security_group_rule" "confluence-public-allow-http-ingress" {
provider = "aws.us-east-2"
type = "ingress"
protocol = "tcp"
from_port = "80"
to_port = "80"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_security_group_rule" "confluence-public-allow-https-ingress" {
provider = "aws.us-east-2"
type = "ingress"
protocol = "tcp"
from_port = "443"
to_port = "443"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_security_group_rule" "confluence-public-allow-alt-http-ingress" {
provider = "aws.us-east-2"
type = "ingress"
protocol = "tcp"
from_port = "8080"
to_port = "8080"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_security_group_rule" "confluence-public-allow-ssh-ingress" {
provider = "aws.us-east-2"
type = "ingress"
protocol = "tcp"
from_port = "22"
to_port = "22"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_security_group_rule" "confluence-public-allow-all-egress-tcp" {
provider = "aws.us-east-2"
type = "egress"
protocol = "tcp"
from_port = "0"
to_port = "65535"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_security_group_rule" "confluence-public-allow-all-egress-udp" {
provider = "aws.us-east-2"
type = "egress"
protocol = "udp"
from_port = "0"
to_port = "65535"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.mcws-confluence-public-ec2-sg.id}"
}
resource "aws_instance" "mcws-confluence" {
provider = "aws.us-east-2"
provider = "aws.us-east-2"
ami = "ami-0f65671a86f061fcd"
instance_type = "t2.medium"
key_name = "mcws"
security_groups = ["mcws-confluence-public-ec2-sg"]
disable_api_termination = true
root_block_device {
volume_type = "gp2"
volume_size = 80
}
tags {
Name = "mcws_confluence"
app = "confluence"
project = "mcws"
}
}