Skip to content

Commit 59fe88f

Browse files
author
rohit-ng
committed
refactor: remove redundant variables
1 parent 5bb8e29 commit 59fe88f

File tree

3 files changed

+2
-30
lines changed

3 files changed

+2
-30
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ This command will display the values of the stored parameters, ensuring they hav
116116
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Whether to enable deletion protection | `bool` | `false` | no |
117117
| <a name="input_desired_capacity"></a> [desired\_capacity](#input\_desired\_capacity) | Desired capacity of auto scaling group | `number` | `2` | no |
118118
| <a name="input_desired_count_for_kong_service"></a> [desired\_count\_for\_kong\_service](#input\_desired\_count\_for\_kong\_service) | Desired count for kong service | `number` | `1` | no |
119-
| <a name="input_ecs_node_security_group_id"></a> [ecs\_node\_security\_group\_id](#input\_ecs\_node\_security\_group\_id) | ECS node security group id | `string` | `null` | no |
120-
| <a name="input_ecs_task_security_group_id"></a> [ecs\_task\_security\_group\_id](#input\_ecs\_task\_security\_group\_id) | ECS task security group id | `string` | `null` | no |
121119
| <a name="input_force_new_deployment"></a> [force\_new\_deployment](#input\_force\_new\_deployment) | Whether to force new deployment | `bool` | `true` | no |
122120
| <a name="input_instance_type_for_kong"></a> [instance\_type\_for\_kong](#input\_instance\_type\_for\_kong) | Instance type for kong | `string` | `"t2.micro"` | no |
123121
| <a name="input_key_name_for_kong"></a> [key\_name\_for\_kong](#input\_key\_name\_for\_kong) | Key name for to SSH into kong instance | `string` | `null` | no |
@@ -142,8 +140,6 @@ This command will display the values of the stored parameters, ensuring they hav
142140
| <a name="input_rds_instance_class"></a> [rds\_instance\_class](#input\_rds\_instance\_class) | The instance class to use | `string` | `"db.t3.micro"` | no |
143141
| <a name="input_ssl_policy"></a> [ssl\_policy](#input\_ssl\_policy) | (Optional) Name of the SSL Policy for the listener. | `string` | `"ELBSecurityPolicy-2016-08"` | no |
144142
| <a name="input_target_capacity"></a> [target\_capacity](#input\_target\_capacity) | Target Capacity for managed scaling | `number` | `100` | no |
145-
| <a name="input_use_default_ecs_node_security_group"></a> [use\_default\_ecs\_node\_security\_group](#input\_use\_default\_ecs\_node\_security\_group) | Whether to use default ECS node security group | `bool` | `true` | no |
146-
| <a name="input_use_default_ecs_task_security_group"></a> [use\_default\_ecs\_task\_security\_group](#input\_use\_default\_ecs\_task\_security\_group) | Whether to use default ECS task security group | `bool` | `true` | no |
147143
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
148144

149145
## Outputs

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ module "ecs_kong" {
204204
]
205205
network_configuration = {
206206
subnets = var.private_subnet_ids
207-
security_groups = [var.use_default_ecs_task_security_group ? module.ecs_task_security_group.security_group_id : var.ecs_task_security_group_id]
207+
security_groups = [module.ecs_task_security_group.security_group_id]
208208
assign_public_ip = false
209209
}
210210
}
@@ -247,7 +247,7 @@ module "ecs_kong" {
247247
name = local.kong.launch_template_name
248248
image_id = local.kong.image_id
249249
instance_type = var.instance_type_for_kong
250-
vpc_security_group_ids = [var.use_default_ecs_node_security_group ? module.ecs_node_security_group.security_group_id : var.ecs_node_security_group_id]
250+
vpc_security_group_ids = [module.ecs_node_security_group.security_group_id]
251251
key_name = var.key_name_for_kong
252252
user_data = local.ecs.user_data
253253
}

variables.tf

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -141,30 +141,6 @@ variable "target_capacity" {
141141
default = 100
142142
}
143143

144-
variable "use_default_ecs_node_security_group" {
145-
description = "Whether to use default ECS node security group"
146-
type = bool
147-
default = true
148-
}
149-
150-
variable "ecs_node_security_group_id" {
151-
description = "ECS node security group id"
152-
type = string
153-
default = null
154-
}
155-
156-
variable "use_default_ecs_task_security_group" {
157-
description = "Whether to use default ECS task security group"
158-
type = bool
159-
default = true
160-
}
161-
162-
variable "ecs_task_security_group_id" {
163-
description = "ECS task security group id"
164-
type = string
165-
default = null
166-
}
167-
168144
variable "desired_capacity" {
169145
description = "Desired capacity of auto scaling group"
170146
type = number

0 commit comments

Comments
 (0)