Skip to content

Commit 280fb71

Browse files
authored
Merge pull request #9 from druids/feat/fargate-compatibility
fix(fargate): add cpu and memory for fargate tasks
2 parents 7c57606 + da36e74 commit 280fb71

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

service.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ resource "aws_ecs_service" "application" {
2525
}
2626
}
2727

28+
dynamic "network_configuration" {
29+
for_each = contains(var.requires_compatibilities, "FARGATE") ? [1] : []
30+
31+
content {
32+
subnets = var.private_subnet_ids
33+
security_groups = [aws_security_group.application.id]
34+
assign_public_ip = var.assign_public_ip
35+
}
36+
}
37+
38+
2839
lifecycle {
2940
ignore_changes = [desired_count]
3041
}

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,9 @@ variable "requires_compatibilities" {
256256
variable "network_mode" {
257257
default = "bridge"
258258
type = string
259+
}
260+
261+
variable "assign_public_ip" {
262+
default = false
263+
type = bool
259264
}

0 commit comments

Comments
 (0)