Skip to content

Commit

Permalink
Updated to test
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 19, 2024
1 parent ad87880 commit 5f0d6aa
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions iam_policy.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
resource "aws_iam_role" "rhel_x86_codepipeline_role" {
name = "rhel-x86-image-pipeline-demo-codepipeline-role"

assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Principal = {
Service = "codepipeline.amazonaws.com"
}
Action = "sts:AssumeRole"
}
]
})
}

resource "aws_iam_policy" "rhel_x86_codepipeline_permissions" {
name = "rhel-x86-codepipeline-permissions"
description = "IAM policy for RHEL x86 CodePipeline to access necessary AWS services"
Expand Down Expand Up @@ -81,6 +98,6 @@ resource "aws_iam_policy" "rhel_x86_codepipeline_permissions" {
}

resource "aws_iam_role_policy_attachment" "rhel_x86_codepipeline_role_attachment" {
role = "rhel-x86-image-pipeline-demo-codepipeline-role"
role = aws_iam_role.rhel_x86_codepipeline_role.name
policy_arn = aws_iam_policy.rhel_x86_codepipeline_permissions.arn
}
}

0 comments on commit 5f0d6aa

Please sign in to comment.