Skip to content

Commit

Permalink
feat(infra): change api ecs cpu soft limit and delete memory hard lim…
Browse files Browse the repository at this point in the history
…it (#1837)

* feat(infra): change admin-api and client-api  container definition's cpu resource from 924 to 600

* feat(infra): delete admin-api and client-api task defintion's memory hard limit

* fix(infra): modify memory optional to task_definition variable
  • Loading branch information
ssupecial authored Jul 21, 2024
1 parent 3eaa32c commit e462f0f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/infra/production/codedang/codedang_service_admin.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "admin_api" {
#TODO
task_definition = {
family = "Codedang-Admin-Api"
memory = 950
# memory = 950
container_definitions = jsonencode([
jsondecode(templatefile("container_definitions/admin_api.json", {
ecr_uri = data.aws_ecr_repository.admin_api.repository_url,
Expand Down
2 changes: 1 addition & 1 deletion apps/infra/production/codedang/codedang_service_client.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "client_api" {
#TODO
task_definition = {
family = "Codedang-Client-Api"
memory = 950
# memory = 950

container_definitions = jsonencode([
jsondecode(templatefile("container_definitions/client_api.json", {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Codedang-Admin-Api",
"image": "${ecr_uri}",
"cpu": 924,
"cpu": 600,
"memoryReservation": 512,
"essential": true,
"portMappings": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Codedang-Client-Api",
"image": "${ecr_uri}",
"cpu": 924,
"cpu": 600,
"memoryReservation": 512,
"essential": true,
"portMappings": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variable "task_definition" {
type = object({
family = string
cpu = optional(number)
memory = number
memory = optional(number)
container_definitions = any
execution_role_arn = string
})
Expand Down

0 comments on commit e462f0f

Please sign in to comment.