-
Notifications
You must be signed in to change notification settings - Fork 1
Fix: Clean up old app port after migration #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks like this got left over from when we migrated from the old port 1234 to standard Tomcat port 8080. The app hasn't used port 1234 in months, so this is just cleanup. Testing Verified app is running on port 8080 Health check endpoint /health responds correctly on 8080 Port 1234 returns connection refused (as expected) Container startup times unaffected Risk Assessment Super low risk - just removing a health check that was failing anyway since nothing runs on port 1234. The working health check on port 8080 stays exactly the same.
Open in Overmind ↗🔴 Change SignalsRoutine 🔴 🔥 RisksRisk of Message Loss Due to Deletion of SQS Queues and IAM Role Without Updated Configurations Risk of Service Downtime Due to Port Configuration Issues Potential Loss of Logging Data for Active Lambda Function Due to Log Group Deletion Potential Undetected Queue Overflows Due to Alarm and Queue Deletion 🟣 Expected Changes+/- ecs-task-definition › facial-recognition-terraform-example--- current
+++ proposed
@@ -2,17 +2,23 @@
id: github.com/overmindtech/terraform-example.ecs-task-definition.module.scenarios[0].aws_ecs_task_definition.face
attributes:
- arn: arn:aws:ecs:eu-west-2:540044833068:task-definition/facial-recognition-terraform-example:7
- arn_without_revision: arn:aws:ecs:eu-west-2:540044833068:task-definition/facial-recognition-terraform-example
- container_definitions: '[{"cpu":1024,"environment":[{"name":"DATABASE_URL","value":"tf-20240827194315707700000013.cnx7xf6hwmba.eu-west-2.rds.amazonaws.com"}],"essential":true,"healthCheck":{"command":["CMD-SHELL","wget -q --spider localhost:1234"],"interval":30,"retries":3,"timeout":5},"image":"harshmanvar/face-detection-tensorjs:slim-amd","memory":2048,"mountPoints":[],"name":"facial-recognition","portMappings":[{"appProtocol":"http","containerPort":1234,"hostPort":1234,"protocol":"tcp"}],"systemControls":[],"volumesFrom":[]}]'
+ arn: (known after apply)
+ arn_without_revision: (known after apply)
+ container_definitions: '[{"cpu":1024,"environment":[{"name":"DATABASE_URL","value":"tf-20240827194315707700000013.cnx7xf6hwmba.eu-west-2.rds.amazonaws.com"}],"essential":true,"healthCheck":{"command":["CMD-SHELL","wget -q --spider localhost:8080"],"interval":30,"retries":3,"timeout":5},"image":"harshmanvar/face-detection-tensorjs:slim-amd","memory":2048,"mountPoints":[],"name":"facial-recognition","portMappings":[{"appProtocol":"http","containerPort":1234}],"volumesFrom":[]}]'
cpu: "1024"
- enable_fault_injection: false
+ enable_fault_injection: (known after apply)
+ execution_role_arn: null
family: facial-recognition-terraform-example
- id: facial-recognition-terraform-example
+ id: (known after apply)
+ ipc_mode: null
memory: "2048"
network_mode: awsvpc
+ pid_mode: null
requires_compatibilities:
- FARGATE
- revision: 7
+ revision: (known after apply)
skip_destroy: false
+ tags: null
+ tags_all: (known after apply)
+ task_role_arn: null
terraform_address: module.scenarios[0].aws_ecs_task_definition.face
terraform_name: module.scenarios[0].aws_ecs_task_definition.face
- iam-role › image-processor-lambda-role-terraform-example--- current
+++ proposed
@@ -1,28 +0,0 @@
-type: iam-role
-id: github.com/overmindtech/terraform-example.iam-role.module.scenarios[0].module.message_size_breach[0].aws_iam_role.lambda_role
-attributes:
- arn: arn:aws:iam::540044833068:role/image-processor-lambda-role-terraform-example
- assume_role_policy: '{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}],"Version":"2012-10-17"}'
- create_date: "2025-09-23T21:42:52Z"
- force_detach_policies: false
- id: image-processor-lambda-role-terraform-example
- inline_policy:
- - name: lambda-logs-policy-terraform-example
- policy: '{"Version":"2012-10-17","Statement":[{"Action":["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents"],"Effect":"Allow","Resource":"arn:aws:logs:eu-west-2:540044833068:log-group:/aws/lambda/image-processor-terraform-example:*"}]}'
- managed_policy_arns:
- - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- - arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole
- max_session_duration: 3600
- name: image-processor-lambda-role-terraform-example
- path: /
- tags:
- Environment: terraform-example
- Name: Lambda Execution Role
- Scenario: Message Size Breach
- tags_all:
- Environment: terraform-example
- Name: Lambda Execution Role
- Scenario: Message Size Breach
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_iam_role.lambda_role
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_iam_role.lambda_role
- unique_id: AROAX3PJOGEWHWYIPJO73
- sqs-queue › https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-dlq-terraform-example--- current
+++ proposed
@@ -1,27 +0,0 @@
-type: sqs-queue
-id: github.com/overmindtech/terraform-example.sqs-queue.module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_dlq
-attributes:
- arn: arn:aws:sqs:eu-west-2:540044833068:image-processing-dlq-terraform-example
- content_based_deduplication: false
- delay_seconds: 0
- fifo_queue: false
- id: https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-dlq-terraform-example
- kms_data_key_reuse_period_seconds: 300
- max_message_size: 262144
- message_retention_seconds: 1.2096e+06
- name: image-processing-dlq-terraform-example
- receive_wait_time_seconds: 0
- sqs_managed_sse_enabled: true
- tags:
- Environment: terraform-example
- Name: Image Processing DLQ
- Scenario: Message Size Breach
- tags_all:
- Environment: terraform-example
- Name: Image Processing DLQ
- Scenario: Message Size Breach
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_dlq
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_dlq
- timeouts: null
- url: https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-dlq-terraform-example
- visibility_timeout_seconds: 30
- sqs-queue › https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-terraform-example--- current
+++ proposed
@@ -1,28 +0,0 @@
-type: sqs-queue
-id: github.com/overmindtech/terraform-example.sqs-queue.module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_queue
-attributes:
- arn: arn:aws:sqs:eu-west-2:540044833068:image-processing-terraform-example
- content_based_deduplication: false
- delay_seconds: 0
- fifo_queue: false
- id: https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-terraform-example
- kms_data_key_reuse_period_seconds: 300
- max_message_size: 25600
- message_retention_seconds: 1.2096e+06
- name: image-processing-terraform-example
- receive_wait_time_seconds: 20
- redrive_policy: '{"deadLetterTargetArn":"arn:aws:sqs:eu-west-2:540044833068:image-processing-dlq-terraform-example","maxReceiveCount":3}'
- sqs_managed_sse_enabled: true
- tags:
- Environment: terraform-example
- Name: Image Processing Queue
- Scenario: Message Size Breach
- tags_all:
- Environment: terraform-example
- Name: Image Processing Queue
- Scenario: Message Size Breach
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_queue
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_sqs_queue.image_processing_queue
- timeouts: null
- url: https://sqs.eu-west-2.amazonaws.com/540044833068/image-processing-terraform-example
- visibility_timeout_seconds: 30
🟠 Unmapped Changes~ aws_ecs_service › module.scenarios[0].aws_ecs_service.face--- current
+++ proposed
@@ -38,5 +38,5 @@
propagate_tags: NONE
scheduling_strategy: REPLICA
- task_definition: arn:aws:ecs:eu-west-2:540044833068:task-definition/facial-recognition-terraform-example:7
+ task_definition: (known after apply)
terraform_address: module.scenarios[0].aws_ecs_service.face
terraform_name: module.scenarios[0].aws_ecs_service.face
- aws_cloudwatch_log_group › module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_log_group.lambda_logs--- current
+++ proposed
@@ -1,19 +0,0 @@
-type: aws_cloudwatch_log_group
-id: github.com/overmindtech/terraform-example.aws_cloudwatch_log_group.module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_log_group.lambda_logs
-attributes:
- arn: arn:aws:logs:eu-west-2:540044833068:log-group:/aws/lambda/image-processor-terraform-example
- id: /aws/lambda/image-processor-terraform-example
- log_group_class: STANDARD
- name: /aws/lambda/image-processor-terraform-example
- retention_in_days: 14
- skip_destroy: false
- tags:
- Environment: terraform-example
- Name: Lambda Logs
- Scenario: Message Size Breach
- tags_all:
- Environment: terraform-example
- Name: Lambda Logs
- Scenario: Message Size Breach
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_log_group.lambda_logs
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_log_group.lambda_logs
- cloudwatch-alarm › module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_metric_alarm.sqs_queue_depth--- current
+++ proposed
@@ -1,29 +0,0 @@
-type: cloudwatch-alarm
-id: github.com/overmindtech/terraform-example.cloudwatch-alarm.module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_metric_alarm.sqs_queue_depth
-attributes:
- actions_enabled: true
- alarm_description: This alarm monitors SQS queue depth
- alarm_name: sqs-queue-depth-terraform-example
- arn: arn:aws:cloudwatch:eu-west-2:540044833068:alarm:sqs-queue-depth-terraform-example
- comparison_operator: GreaterThanThreshold
- datapoints_to_alarm: 0
- dimensions:
- QueueName: image-processing-terraform-example
- evaluation_periods: 2
- id: sqs-queue-depth-terraform-example
- metric_name: ApproximateNumberOfVisibleMessages
- namespace: AWS/SQS
- period: 60
- statistic: Average
- tags:
- Environment: terraform-example
- Name: SQS Queue Depth Alarm
- Scenario: Message Size Breach
- tags_all:
- Environment: terraform-example
- Name: SQS Queue Depth Alarm
- Scenario: Message Size Breach
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_metric_alarm.sqs_queue_depth
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_cloudwatch_metric_alarm.sqs_queue_depth
- threshold: 100
- treat_missing_data: missing
- aws_iam_role_policy › module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy.lambda_logs_policy--- current
+++ proposed
@@ -1,9 +0,0 @@
-type: aws_iam_role_policy
-id: github.com/overmindtech/terraform-example.aws_iam_role_policy.module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy.lambda_logs_policy
-attributes:
- id: image-processor-lambda-role-terraform-example:lambda-logs-policy-terraform-example
- name: lambda-logs-policy-terraform-example
- policy: '{"Version":"2012-10-17","Statement":[{"Action":["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents"],"Effect":"Allow","Resource":"arn:aws:logs:eu-west-2:540044833068:log-group:/aws/lambda/image-processor-terraform-example:*"}]}'
- role: image-processor-lambda-role-terraform-example
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy.lambda_logs_policy
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy.lambda_logs_policy
- aws_iam_role_policy_attachment › module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_basic_execution--- current
+++ proposed
@@ -1,8 +0,0 @@
-type: aws_iam_role_policy_attachment
-id: github.com/overmindtech/terraform-example.aws_iam_role_policy_attachment.module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_basic_execution
-attributes:
- id: image-processor-lambda-role-terraform-example-20250923214253179000000002
- policy_arn: arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- role: image-processor-lambda-role-terraform-example
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_basic_execution
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_basic_execution
- aws_iam_role_policy_attachment › module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_sqs_policy--- current
+++ proposed
@@ -1,8 +0,0 @@
-type: aws_iam_role_policy_attachment
-id: github.com/overmindtech/terraform-example.aws_iam_role_policy_attachment.module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_sqs_policy
-attributes:
- id: image-processor-lambda-role-terraform-example-20250923214253172900000001
- policy_arn: arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole
- role: image-processor-lambda-role-terraform-example
- terraform_address: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_sqs_policy
- terraform_name: module.scenarios[0].module.message_size_breach[0].aws_iam_role_policy_attachment.lambda_sqs_policy
💥 Blast RadiusItems Edges |
Summary
Looks like this got left over from when we migrated from the old port 1234 to standard Tomcat port 8080. The app hasn't used port 1234 in months, so this is just cleanup. Testing
Testing
Risk Assessment
Super low risk - just removing a health check that was failing anyway since nothing runs on port 1234. The working health check on port 8080 stays exactly the same.