Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct assume role permissions for SNS service to assume IAM role #220

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ resource "aws_iam_role" "sns_feedback_role" {
path = var.sns_topic_feedback_role_path
force_detach_policies = var.sns_topic_feedback_role_force_detach_policies
permissions_boundary = var.sns_topic_feedback_role_permissions_boundary
assume_role_policy = data.aws_iam_policy_document.sns_feedback[0].json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part 1:
lets leave this as is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

assume_role_policy = jsonencode({
Version = "2012-10-17",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part 2:
Replace the permissions here with the permissions defined below

also, I guess this has been broken for 2 years?! 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hoping you meant extend this with the inline permission that I had added ?

Statement = [{
Effect = "Allow",
Principal = {
Service = "sns.amazonaws.com"
},
Action = "sts:AssumeRole"
}]
})

tags = merge(var.tags, var.sns_topic_feedback_role_tags)
}
Loading