diff options
| author | Alex Schofield <git@ajschof.me> | 2024-08-14 22:57:12 +0100 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2024-08-14 22:57:12 +0100 |
| commit | 3d15fec47fa2c1f8ff25013e23d069f0eaa02f3f (patch) | |
| tree | 43028025d82aeb379dc333b67924ea0771a25ecc /terraform/iam.tf | |
| parent | 9ff947c167932bb9ff93f05c8adf2ffcd98b91cc (diff) | |
| parent | 911b2a4ba08e59f46a53b5252a044a5853796f78 (diff) | |
| download | de-project-bentley-3d15fec47fa2c1f8ff25013e23d069f0eaa02f3f.tar.gz de-project-bentley-3d15fec47fa2c1f8ff25013e23d069f0eaa02f3f.zip | |
Merge remote-tracking branch 'origin/feature/iam/alex-changes' into feature/iam/alex-changes
Diffstat (limited to 'terraform/iam.tf')
| -rw-r--r-- | terraform/iam.tf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/terraform/iam.tf b/terraform/iam.tf index 20aeab3..6c6b4fc 100644 --- a/terraform/iam.tf +++ b/terraform/iam.tf @@ -143,3 +143,31 @@ resource "aws_iam_role_policy_attachment" "cw_attachment" { ################ # RDS POLICIES # ################ + +################### +# EVENTS POLICIES # +################### + +data "aws_iam_policy_document" "cloudwatch_events_policy" { + statement { + actions = [ + "events:PutRule", + "events:PutTargets", + "events:RemoveTargets", + "events:DeleteRule", + "events:PutEvents" + ] + resources = ["*"] + effect = "Allow" + } +} + +resource "aws_iam_policy" "cloudwatch_events_policy" { + name = "cloudwatch_events_policy" + policy = data.aws_iam_policy_document.cloudwatch_events_policy.json +} + +resource "aws_iam_role_policy_attachment" "cloudwatch_events_attachment" { + role = aws_iam_role.multi_service_role.name + policy_arn = aws_iam_policy.cloudwatch_events_policy.arn +} |
