Skip to content

Commit 4489660

Browse files
docs: Update example to show how to pass additional permissions and policies to the tasks role (#115)
Co-authored-by: Anton Babenko <[email protected]>
1 parent 2604124 commit 4489660

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.82.0
3+
rev: v1.83.3
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

examples/complete/main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ module "ecs" {
120120
}
121121
}
122122

123+
tasks_iam_role_name = "${local.name}-tasks"
124+
tasks_iam_role_description = "Example tasks IAM role for ${local.name}"
125+
tasks_iam_role_policies = {
126+
ReadOnlyAccess = "arn:aws:iam::aws:policy/ReadOnlyAccess"
127+
}
128+
tasks_iam_role_statements = [
129+
{
130+
actions = ["s3:List*"]
131+
resources = ["arn:aws:s3:::*"]
132+
}
133+
]
134+
123135
subnet_ids = module.vpc.private_subnets
124136
security_group_rules = {
125137
alb_ingress_3000 = {

0 commit comments

Comments
 (0)