Skip to content

Commit

Permalink
adding sqspoller
Browse files Browse the repository at this point in the history
  • Loading branch information
STollenaar committed Sep 20, 2023
1 parent 87f6ee6 commit a3148e0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
30 changes: 28 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ resource "aws_ecs_task_definition" "statisticsbot_service" {
{
name = local.name
image = "${data.terraform_remote_state.discord_bots_cluster.outputs.discord_bots_repo.repository_url}:${local.name}-latest-arm64"
cpu = 256
memory = 400
cpu = 150
memory = 100
essential = true

portMappings = [
Expand Down Expand Up @@ -117,6 +117,32 @@ resource "aws_ecs_task_definition" "statisticsbot_service" {
value = "/mongodb/statsuser/username"
},
]
},
{
name = "sqspoller"
image = "${data.terraform_remote_state.discord_bots_cluster.outputs.discord_bots_repo.repository_url}:sqspoller-latest-arm64"
cpu = 50
memory = 100
essential = true

environment = [
{
name = "AWS_REGION"
value = data.aws_region.current.name
},
{
name = "SQS_REQUEST"
value = aws_sqs_queue.markov_user_request.name
},
{
name = "SQS_RESPONSE"
value = aws_sqs_queue.markov_user_response.name
},
{
name = "STATSBOT_URL"
value = "localhost"
},
]
}
])
}
1 change: 1 addition & 0 deletions terraform/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ output "sqs" {
request = aws_sqs_queue.markov_user_request,
response = aws_sqs_queue.markov_user_response,
}
sensitive = true
}

0 comments on commit a3148e0

Please sign in to comment.