Skip to content

Commit

Permalink
add scheduler permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ssickles committed Apr 18, 2024
1 parent 6b5bec1 commit 871f14f
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions access.tf
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
resource "aws_iam_role_policy_attachment" "batch-job-creation" {
role = local.role_name
policy_arn = aws_iam_policy.batch-job-creation.arn
policy_arn = "arn:aws:iam::aws:policy/AWSBatchFullAccess"
}

resource "aws_iam_policy" "batch-job-creation" {
name = local.resource_name
policy = data.aws_iam_policy_document.batch-job-creation.json
description = "Policy to enable the management and creation of batch jobs"
}

data "aws_iam_policy_document" "batch-job-creation" {
statement {
effect = "Allow"
actions = [
"batch:SubmitJob",
"batch:DescribeJobs",
"batch:TerminateJob",
"batch:ListJobs",
"batch:ListJobDefinitions",
"batch:DescribeJobDefinitions",
"batch:DescribeJobQueues",
"batch:ListJobQueues",
]
resources = ["*"]
}
resource "aws_iam_role_policy_attachment" "scheduler-admin" {
role = local.role_name
policy_arn = "arn:aws:iam::aws:policy/AmazonEventBridgeSchedulerFullAccess"
}

0 comments on commit 871f14f

Please sign in to comment.