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

More compact way for feedback role(s) #58

Open
xnick123 opened this issue Dec 16, 2024 · 0 comments
Open

More compact way for feedback role(s) #58

xnick123 opened this issue Dec 16, 2024 · 0 comments

Comments

@xnick123
Copy link

Is your request related to a problem? Please describe.

I often use the same role for the 4 feedback types and the same success/failure rate. Which i find, blows up my code unproportinally. Most of my SNS modules based on you great tf-module just need 6 lines. But because of the feedback lines, it gets up to 5 times so much. Having repositories with 20-30 SNS modules created, feels like overhead.

`

application_feedback = {
failure_role_arn = aws_iam_role.this.arn
success_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
firehose_feedback = {
failure_role_arn = aws_iam_role.this.arn
success_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
http_feedback = {
failure_role_arn = aws_iam_role.this.arn
success_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
lambda_feedback = {
failure_role_arn = aws_iam_role.this.arn
success_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
sqs_feedback = {
failure_role_arn = aws_iam_role.this.arn
success_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
`

Describe the solution you'd like.

Ideally i'd love to have a way e.g. 3 such values like below or in any way which would be consistent with best practices.

`

global_feedback = {
enable = ["sqs", "lambda", "firehose"]
success_iam_role_arn = aws_iam_role.this.arn
failure_iam_role_arn = aws_iam_role.this.arn
success_sample_rate = 100
}
`
Global_feedback would require priority over the others, in case somebody uses the regular ones. But i understand that this would open doors to confusion.

Describe alternatives you've considered.

  • I know i could use a for loop to create them, and handle that outside. I do that where i can. But i often have cases where it is not feasible.
  • Instead i wrote a wrapper module to hide away the extra lines of code, which is ok, but i would like to avoid if others here have the same challenge like me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant