Skip to content

Commit

Permalink
feat(DMVP-5181): Add IAM Role module
Browse files Browse the repository at this point in the history
  • Loading branch information
aramkarapetian committed Sep 24, 2024
1 parent 2235c0e commit 793e5bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "aws_iam_role" "aws-role" {
assume_role_policy = data.aws_iam_policy_document.assume_role_policy.json
}

resource "aws_iam_role_policy_attachment" "AWSRole" {
resource "aws_iam_role_policy_attachment" "awsrole" {
policy_arn = aws_iam_policy.this.arn
role = aws_iam_role.aws-role.name
}
19 changes: 19 additions & 0 deletions modules/role/tests/without-trust-relationship/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module "test" {
source = "../../"

name = "test"
description = "test-role"

policy = [
{
actions = ["s3:*", "s3-object-lambda:*"]
resources = ["*"]
},
{
actions = ["sqs:*"]
resources = ["*"]
}
]
trust_relationship = []

}

0 comments on commit 793e5bb

Please sign in to comment.