Skip to content

Commit

Permalink
add service-linked-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Aug 28, 2025
1 parent a76d54d commit 92976a9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aws_iam_service_linked_role" "roles" {
for_each = toset(var.service_linked_roles)
aws_service_name = each.key

tags = merge(
local.base_tags,
# module.tags.tags,
# module.tags.finops_roles["servicelinkedrole"],
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
service_linked_roles = [
"autoscaling.amazonaws.com",
"dynamodb.application-autoscaling.amazonaws.com",
"ecs.amazonaws.com",
"trustedadvisor.amazonaws.com",
"support.amazonaws.com",
"spot.amazonaws.com",
"elasticache.amazonaws.com",
"eks-nodegroup.amazonaws.com",
"ecs.application-autoscaling.amazonaws.com",
"rds.amazonaws.com",
"rds.application-autoscaling.amazonaws.com",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "service_linked_roles" {
description = "List of service linked role service name"
type = list(string)
default = []
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ main_files:
- INF.group.inf-cloud-admin.tf
- INF.group.inf-ip-restriction.tf
- inf-cloud-admin.users.tf
# for service linked roles
- service-linked-roles.tf
- variables.service-linked-roles.auto.tfvars
- variables.service-linked-roles.tf

main_files_ew:
- INF.role.billing.tf
Expand Down

0 comments on commit 92976a9

Please sign in to comment.