Skip to content

Commit

Permalink
feat: add new variable ecs_requires_compatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Oct 24, 2024
1 parent 7a45523 commit e5aa531
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [7.5.2] - 2024-10-23
## [7.6.0] - 2024-10-24
### Fixed
- Added condition for `k8s` service account secret creation.
- Added new variable `ecs_platform_version` to handle ECS platform version update.
- Added new variable `ecs_requires_compatibilities` to support overwriting compatibilities(when with `EC2`, CPU will not able beyond to `8`, and Memorry can not beyond `60G`).

## [7.5.1] - 2024-10-22
### Added
Expand Down
1 change: 1 addition & 0 deletions VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
| tcp\_keepalive\_intvl | Sets net.ipv4.tcp_keepalive_intvl (seconds) | number | `30` | no |
| tcp\_keepalive\_probes | Sets net.ipv4.tcp_keepalive_probes (seconds) | number | `2` | no |
| ecs\_platform\_version | ECS Service Platform Version | `string` | `"LATEST"`
| ecs\_requires\_compatibilities | ECS task definition requires compatibilities. | `list(string)` | `["EC2", "FARGATE"]` | no |

### apiary_assume_roles

Expand Down
4 changes: 2 additions & 2 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readwrite" {
network_mode = "awsvpc"
memory = var.hms_rw_heapsize
cpu = var.hms_rw_cpu
requires_compatibilities = ["EC2", "FARGATE"]
requires_compatibilities = var.ecs_requires_compatibilities
container_definitions = local.hms_readwrite_template
tags = var.apiary_tags
}
Expand All @@ -37,7 +37,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readonly" {
network_mode = "awsvpc"
memory = var.hms_ro_heapsize
cpu = var.hms_ro_cpu
requires_compatibilities = ["EC2", "FARGATE"]
requires_compatibilities = var.ecs_requires_compatibilities
container_definitions = local.hms_readonly_template
tags = var.apiary_tags
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1005,3 +1005,9 @@ variable "ecs_platform_version" {
type = string
default = "LATEST"
}

variable "ecs_requires_compatibilities" {
description = "ECS task definition requires compatibilities, default EC2; FARGATE"
type = list(string)
default = ["EC2", "FARGATE"]
}

0 comments on commit e5aa531

Please sign in to comment.