Skip to content

Commit

Permalink
feat: add ecs platform version
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Oct 24, 2024
1 parent 0b8a6c6 commit 7a45523
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [7.5.2] - 2024-10-23
### Fixed
- Added condition for `k8s` service account secret creation.
- Added new variable `ecs_platform_version` to handle ECS platform version update.

## [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 @@ -136,6 +136,7 @@
| tcp\_keepalive\_time | Sets net.ipv4.tcp_keepalive_time (seconds). | number | `200` | no |
| 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"`

### apiary_assume_roles

Expand Down
15 changes: 8 additions & 7 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ resource "aws_ecs_service" "apiary_hms_readwrite_service" {
}

resource "aws_ecs_service" "apiary_hms_readonly_service" {
count = var.hms_instance_type == "ecs" ? 1 : 0
depends_on = [aws_lb_target_group.apiary_hms_ro_tg]
name = "${local.instance_alias}-hms-readonly-service"
launch_type = "FARGATE"
cluster = aws_ecs_cluster.apiary[0].id
task_definition = aws_ecs_task_definition.apiary_hms_readonly[0].arn
desired_count = var.hms_ro_ecs_task_count
count = var.hms_instance_type == "ecs" ? 1 : 0
depends_on = [aws_lb_target_group.apiary_hms_ro_tg]
name = "${local.instance_alias}-hms-readonly-service"
launch_type = "FARGATE"
platform_version = var.ecs_platform_version
cluster = aws_ecs_cluster.apiary[0].id
task_definition = aws_ecs_task_definition.apiary_hms_readonly[0].arn
desired_count = var.hms_ro_ecs_task_count

load_balancer {
target_group_arn = aws_lb_target_group.apiary_hms_ro_tg[0].arn
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -999,3 +999,9 @@ variable "apiary_managed_service_iamroles" {
type = list(string)
default = []
}

variable "ecs_platform_version" {
description = "ECS Service Platform Version"
type = string
default = "LATEST"
}

0 comments on commit 7a45523

Please sign in to comment.