Skip to content

Commit

Permalink
fix(ecs): create service linked role
Browse files Browse the repository at this point in the history
Signed-off-by: kolvin <15124052+Kolvin@users.noreply.github.com>
  • Loading branch information
kolvin committed Jun 18, 2023
1 parent 11ff9a7 commit b110a70
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
24 changes: 24 additions & 0 deletions ecs/dev/eu-west-1/cluster.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
resource "aws_iam_service_linked_role" "ecs" {
aws_service_name = "ecs.amazonaws.com"
}

module "ecs" {
source = "git::https://github.com/terraform-aws-modules/terraform-aws-ecs//?ref=v5.2.0"

cluster_name = "dev"

# Capacity provider
fargate_capacity_providers = {
FARGATE_SPOT = {
default_capacity_provider_strategy = {
weight = 50
}
}
}

tags = {}

depends_on = [
aws_iam_service_linked_role.ecs
]
}
Empty file added ecs/dev/eu-west-1/iam.tf
Empty file.
25 changes: 0 additions & 25 deletions ecs/dev/eu-west-1/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
include "root" {
path = find_in_parent_folders("common.hcl")
}

terraform {
source = "git::https://github.com/terraform-aws-modules/terraform-aws-ecs//?ref=v5.2.0"
}

inputs = {
cluster_name = "dev"

# Capacity provider
fargate_capacity_providers = {
FARGATE = {
default_capacity_provider_strategy = {
weight = 50
base = 20
}
}
FARGATE_SPOT = {
default_capacity_provider_strategy = {
weight = 50
}
}
}

tags = {}
}

0 comments on commit b110a70

Please sign in to comment.