File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,20 @@ resource "aws_security_group" "public_security_group" {
99 egress {
1010 description = " Allow all outbound"
1111 from_port = 0
12- to_port = 65535
12+ to_port = 0
1313 protocol = " -1"
1414 cidr_blocks = [" 0.0.0.0/0" ]
1515 }
1616
17+ ingress {
18+ description = " Allow ssh connection inbound public"
19+ from_port = 22
20+ to_port = 22
21+ protocol = " tcp"
22+ cidr_blocks = [" 0.0.0.0/0" ]
23+ }
24+
25+
1726 ingress {
1827 description = " Allow http inbound public"
1928 from_port = 80
@@ -66,7 +75,7 @@ resource "aws_security_group" "private_security_group" {
6675
6776 egress {
6877 from_port = 0
69- to_port = 65535
78+ to_port = 0
7079 protocol = " -1"
7180 cidr_blocks = [" 0.0.0.0/0" ]
7281 }
@@ -83,7 +92,7 @@ resource "aws_security_group_rule" "allow_inbound_private" {
8392 count = var. cluster_architecture == " 2-tier" || var. cluster_architecture == " 3-tier" ? 1 : 0
8493 type = " ingress"
8594 from_port = 0
86- to_port = 65535
95+ to_port = 0
8796 protocol = " -1"
8897 source_security_group_id = aws_security_group. public_security_group [0 ]. id
8998 security_group_id = aws_security_group. private_security_group [0 ]. id
@@ -99,7 +108,7 @@ resource "aws_security_group" "storage_security_group" {
99108
100109 egress {
101110 from_port = 0
102- to_port = 65535
111+ to_port = 0
103112 protocol = " -1"
104113 cidr_blocks = [" 0.0.0.0/0" ]
105114 }
@@ -116,7 +125,7 @@ resource "aws_security_group_rule" "allow_inbound_storage" {
116125 count = var. cluster_architecture == " 3-tier" ? 1 : 0
117126 type = " ingress"
118127 from_port = 0
119- to_port = 65535
128+ to_port = 0
120129 protocol = " -1"
121130 source_security_group_id = aws_security_group. private_security_group [0 ]. id
122131 security_group_id = aws_security_group. storage_security_group [0 ]. id
Original file line number Diff line number Diff line change 22variable "cluster_prefix" {
33 description = " To apply generic naming to AWS VPC Resources"
44 type = string
5- default = " copper"
65}
76
87variable "cluster_environment" {
98 description = " To apply generic environment to AWS VPC Resources"
109 type = string
11- default = " devops"
1210}
1311
1412variable "cluster_architecture" {
1513 description = " To apply generic cluster_environment to AWS VPC Resources"
1614 type = string
17- default = " 3-tier"
1815}
1916
2017variable "cidr" {
2118 description = " CIDR block value to define the size of the AWS VPC"
2219 type = string
23- default = " 10.0.0.0/20"
2420}
2521
2622variable "subnet_bits" {
2723 description = " Subnet bits for cidrsubnet interpolation or Size we need to define for the Subnet (cidr of VPC + Subnet bits)"
2824 type = string
29- default = " 4"
3025}
You can’t perform that action at this time.
0 commit comments