@@ -43,73 +43,133 @@ variable "vpc_id" {
4343 description = " VPC ID for the security group"
4444}
4545
46+ variable "tags" {
47+ default = {}
48+ type = map (string )
49+ description = " Extra tags to attach to the security group resources"
50+ }
51+
52+ variable "name" {
53+ type = string
54+ description = " The name of the resources"
55+ }
56+
57+ variable "environment" {
58+ type = string
59+ description = " The environment name for the resources"
60+ }
61+
62+ variable "owner" {
63+ type = string
64+ description = " Owner's name for the resource"
65+ }
66+
67+ variable "cost_center" {
68+ type = string
69+ description = " Cost center identifier for the resource"
70+ }
71+
72+ variable "application" {
73+ type = string
74+ description = " Name of the application related to the resource"
75+ }
76+
77+ variable "ingress_cidr_from_port" {
78+ type = list (number )
79+ description = " List of starting ports for cidr ingress rules of the EC2 security group."
80+ }
81+
82+ variable "ingress_cidr_to_port" {
83+ type = list (number )
84+ description = " List of ending ports for cidr ingress rules of the EC2 security group."
85+ }
86+
87+ variable "ingress_cidr_protocol" {
88+ type = list (string )
89+ description = " List of protocols for cidr ingress rules of the EC2 security group."
90+ }
91+
4692variable "ingress_cidr_block" {
4793 type = list (string )
48- description = " CIDR blocks for EC2 security group ingress rules "
94+ description = " List of CIDR blocks for cidr ingress rules of the EC2 security group. "
4995}
5096
51- variable "ingress_from_port" {
52- description = " The starting port for ingress rules"
97+ variable "ingress_sg_from_port" {
5398 type = list (number )
99+ description = " List of starting ports for sg ingress rules of the EC2 security group."
54100}
55101
56- variable "ingress_to_port" {
57- description = " The ending port for ingress rules"
102+ variable "ingress_sg_to_port" {
58103 type = list (number )
104+ description = " List of ending ports for sg ingress rules of the EC2 security group."
59105}
60106
61- variable "ingress_protocol " {
62- description = " The protocol for ingress rules "
63- type = list ( any )
107+ variable "ingress_sg_protocol " {
108+ type = list ( string )
109+ description = " List of protocols for sg ingress rules of the EC2 security group. "
64110}
65111
66- variable "egress_cidr_block " {
112+ variable "ingress_security_group_ids " {
67113 type = list (string )
68- description = " CIDR blocks for EC2 security group egress rules "
114+ description = " List of Security Group ids for sg ingress rules of the EC2 security group. "
69115}
70116
71- variable "egress_from_port" {
72- description = " The starting port for egress rules"
117+ variable "egress_cidr_from_port" {
73118 type = list (number )
119+ description = " List of starting ports for cidr egress rules of the EC2 security group."
74120}
75121
76- variable "egress_to_port" {
77- description = " The ending port for egress rules"
122+ variable "egress_cidr_to_port" {
78123 type = list (number )
124+ description = " List of ending ports for cidr egress rules of the EC2 security group."
79125}
80126
81- variable "egress_protocol " {
82- description = " The protocol for egress rules "
83- type = list ( any )
127+ variable "egress_cidr_protocol " {
128+ type = list ( string )
129+ description = " List of protocols for cidr egress rules of the EC2 security group. "
84130}
85131
86- variable "tags" {
87- default = {}
88- type = map (string )
89- description = " Extra tags to attach to the security group resources"
132+ variable "egress_cidr_block" {
133+ type = list (string )
134+ description = " List of CIDR blocks for cidr egress rules of the EC2 security group."
90135}
91136
92- variable "name " {
93- type = string
94- description = " The name of the resources "
137+ variable "egress_sg_from_port " {
138+ type = list ( number )
139+ description = " List of starting ports for sg egress rules of the EC2 security group. "
95140}
96141
97- variable "environment" {
142+ variable "egress_sg_to_port" {
143+ type = list (number )
144+ description = " List of ending ports for sg egress rules of the EC2 security group."
145+ }
146+
147+ variable "egress_sg_protocol" {
98148 type = list (string )
99- description = " The environment name for the resources "
149+ description = " List of protocols for sg egress rules of the EC2 security group. "
100150}
101151
102- variable "owner " {
103- type = string
104- description = " Owner's name for the resource "
152+ variable "egress_security_group_ids " {
153+ type = list ( string )
154+ description = " List of Security Group ids for sg egress rules of the EC2 security group. "
105155}
106156
107- variable "cost_center " {
108- type = string
109- description = " Cost center identifier for the resource "
157+ variable "create_ingress_cidr " {
158+ type = bool
159+ description = " Enable or disable CIDR block ingress rules. "
110160}
111161
112- variable "application" {
113- type = string
114- description = " Name of the application related to the resource"
162+ variable "create_ingress_sg" {
163+ type = bool
164+ description = " Enable or disable Security Groups ingress rules."
165+ }
166+
167+ variable "create_egress_cidr" {
168+ type = bool
169+ description = " Enable or disable CIDR block egress rules."
170+ }
171+
172+ variable "create_egress_sg" {
173+ type = bool
174+ description = " Enable or disable Security Groups egress rules."
115175}
0 commit comments