Skip to content

Commit 34f069e

Browse files
committed
add execution_role_arn input
1 parent d60916e commit 34f069e

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

main.tf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,22 @@ module "adminer" {
230230
* Create new ecs service
231231
*/
232232
module "ecs" {
233-
source = "github.com/sil-org/terraform-modules//aws/ecs/service-only?ref=8.13.3"
233+
source = "sil-org/ecs-service/aws"
234+
version = "~> 0.3.0"
235+
234236
cluster_id = module.ecsasg.ecs_cluster_id
235237
service_name = var.app_name
236238
service_env = local.app_env
237239
container_def_json = var.container_def_json
238240
desired_count = var.desired_count
239-
tg_arn = aws_alb_target_group.tg.arn
240-
lb_container_name = "hub"
241-
lb_container_port = "80"
242241
ecsServiceRole_arn = module.ecsasg.ecsServiceRole_arn
242+
execution_role_arn = var.execution_role_arn
243+
244+
load_balancer = [{
245+
container_name = "hub"
246+
container_port = "80"
247+
target_group_arn = aws_alb_target_group.tg.arn
248+
}]
243249
}
244250

245251
/*

variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,12 @@ variable "enable_adminer" {
281281
default = false
282282
type = bool
283283
}
284+
285+
variable "execution_role_arn" {
286+
description = <<-EOF
287+
The IAM role that allows ECS to make AWS API calls on your behalf, such as to pull container images from ECR when
288+
using Fargate or to reference secrets from SSM Parameter Store.
289+
EOF
290+
type = string
291+
default = null
292+
}

0 commit comments

Comments
 (0)