Skip to content

Commit 76df659

Browse files
author
rohit-ng
committed
chore: remove unused variables and module
1 parent dff6b7a commit 76df659

File tree

3 files changed

+3
-49
lines changed

3 files changed

+3
-49
lines changed

data.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
data "aws_ssm_parameter" "ecs_node_ami" {
2-
name = "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id"
3-
}
4-
51
data "aws_vpc" "vpc" {
62
id = var.vpc_id
73
}

locals.tf

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ locals {
1313
}
1414

1515
ecs = {
16-
user_data = <<EOF
17-
#!/bin/bash
18-
echo ECS_CLUSTER=${var.cluster_name} >> /etc/ecs/ecs.config;
19-
EOF
20-
ecs_node_sg_name = "kong"
2116
iam = {
2217
name_prefix = "kong-ecs-exec"
2318
ecs_exec_policy_arn = ["arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"]
@@ -31,27 +26,16 @@ locals {
3126
service_name = "kong"
3227
task_definition_family = "kong"
3328
network_mode = "awsvpc"
34-
launch_template_name = "kong"
35-
image_id = data.aws_ssm_parameter.ecs_node_ami.value
36-
iam_role_policy_attachments = [
37-
"arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy",
38-
"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
39-
"arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
40-
]
41-
42-
alb_sg_name = "kong"
43-
ecs_task_sg_name = "kong"
44-
commands = ["/bin/sh", "-c", "kong migrations bootstrap && ulimit -n 4096 && kong start"]
45-
29+
alb_sg_name = "kong"
30+
ecs_task_sg_name = "kong"
31+
commands = ["/bin/sh", "-c", "kong migrations bootstrap && ulimit -n 4096 && kong start"]
4632
portMappings = [
4733
{ containerPort = 80, hostPort = 80 },
4834
{ containerPort = 8000, hostPort = 8000 },
4935
{ containerPort = 8443, hostPort = 8443 },
5036
{ containerPort = 8001, hostPort = 8001 },
5137
{ containerPort = 8002, hostPort = 8002 }
5238
]
53-
54-
5539
admin_port = 8001
5640
proxy_port = 8000
5741
public_target_group = "kong_public"

main.tf

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,32 +68,6 @@ module "kong_rds" {
6868
tags = merge(local.default_tags, var.rds_db_tags)
6969
}
7070

71-
################################################################################
72-
# ECS Node Security Group
73-
################################################################################
74-
75-
module "ecs_node_security_group" {
76-
source = "terraform-aws-modules/security-group/aws"
77-
version = "~> 5.1.2"
78-
79-
name = local.ecs.ecs_node_sg_name
80-
vpc_id = var.vpc_id
81-
82-
ingress_with_cidr_blocks = [{
83-
from_port = 0
84-
to_port = 0
85-
protocol = "-1"
86-
cidr_blocks = data.aws_vpc.vpc.cidr_block
87-
}]
88-
egress_with_cidr_blocks = [{
89-
from_port = 0
90-
to_port = 0
91-
protocol = "-1"
92-
cidr_blocks = "0.0.0.0/0"
93-
}, ]
94-
tags = local.default_tags
95-
}
96-
9771
################################################################################
9872
# Internal ALB Security Group
9973
################################################################################

0 commit comments

Comments
 (0)