Skip to content

Commit 77868ee

Browse files
committed
Adding platform_version variable.
1 parent 18c41c8 commit 77868ee

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

terraform/modules/service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ resource "aws_ecs_service" "this" {
6868
task_definition = aws_ecs_task_definition.this.arn
6969
desired_count = var.desired_count
7070
launch_type = "FARGATE"
71-
platform_version = "1.4.0"
71+
platform_version = var.platform_version
7272
force_new_deployment = var.force_new_deployment
7373
propagate_tags = "SERVICE"
7474

terraform/modules/service/variables.tf

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ variable "health_check_grace_period_seconds" {
3232
type = number
3333
}
3434

35-
# reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size
36-
variable "memory" {
37-
description = "Amount (in MiB) of memory used by the task."
38-
type = number
39-
}
40-
4135
variable "desired_count" {
4236
description = "Number of instances of the task definition to place and keep running."
4337
type = number
@@ -71,6 +65,12 @@ variable "load_balancers" {
7165
default = []
7266
}
7367

68+
# reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size
69+
variable "memory" {
70+
description = "Amount (in MiB) of memory used by the task."
71+
type = number
72+
}
73+
7474
variable "mount_points" {
7575
description = "The mount points for data volumes in your container"
7676
type = list(object({
@@ -93,6 +93,12 @@ variable "platform" {
9393
})
9494
}
9595

96+
variable "platform_version" {
97+
default = "1.4.0"
98+
description = "Platform version on which to run your service. Only applicable for launch_type set to FARGATE."
99+
type = string
100+
}
101+
96102
variable "port_mappings" {
97103
description = "The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic. For task definitions that use the awsvpc network mode, only specify the containerPort. The hostPort can be left blank or it must be the same value as the containerPort"
98104
type = list(object({

0 commit comments

Comments
 (0)