-
Notifications
You must be signed in to change notification settings - Fork 16
/
vpc.tf
47 lines (39 loc) · 946 Bytes
/
vpc.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
##########################################
########### devops VPC ##############
##########################################
# Create a VPC for the devops Server
resource "aws_vpc" "devops_vpc" {
cidr_block = var.devops_sg_cidr_vpc
enable_dns_hostnames = "true"
tags = {
Name = "DevOps_VPC_Singapore"
}
}
# Create an internet gateway to give internet access
resource "aws_internet_gateway" "devops_internet_gateway" {
vpc_id = aws_vpc.devops_vpc.id
tags = {
Name = "devops_IGW"
}
}
# A permissive security group
resource "aws_security_group" "devops_security_group" {
vpc_id = aws_vpc.devops_vpc.id
# Full inbound access
ingress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
# internet access
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "devops_SG"
}
}