-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/aws_budgets_budget: Add support for notifications #4523
Conversation
Just realised this PR would change the existing behaviour for people upgrading: I'd guess this is not a totally unlikely scenario: Because of the missing notifications support, my current project has a budget-resource and added notifications manually. So if we aren't very careful they will just suddenly disappear. Is there a smart way to avoid this? I've tried modelling notifications as a separate resource (here if you want to have a look) but that has its own limitations since the API doesn't give us an ID we could use to find the notification on read - exact match is the only way. |
Seems like this PR is stalled? |
My current project doesn't rely on budget notifications anymore right now so for me personally this isn't urgent anymore. I'd still be happy to work on any feedback and get this merged though. Gentle nudge @bflad ? |
@bflad what can we do to get some movement on this PR? |
I would also very much like to see this merged, as currently for instance https://registry.terraform.io/modules/devops-workflow/budgets/aws/0.1.1 has a nasty solution using locals {
# Prefix for single budget
notification_cmd_prefix_single = <<EOF
aws budgets create-notification \
--account-id ${data.aws_caller_identity.current.account_id} \
--budget-name ${var.budget_name_prefix}${var.budget_name}-${title(lower(var.time_unit))} \
--subscribers ${join(" ", formatlist("SubscriptionType=EMAIL,Address=%s", var.emails))} \
--notification \
EOF
# Prefix for multiple budgets. So only contain stuff that is common to all budgets in var.budgets
# Could move subscribers here as long as only supporting one
notification_cmd_prefix = <<EOF
aws budgets create-notification \
--account-id ${data.aws_caller_identity.current.account_id} --budget-name \
EOF
} |
I'll happily update https://registry.terraform.io/modules/devops-workflow/budgets/aws/ if this gets merged and solves the issues. That module is basically using a hack that has some issues. It was a temporary solution. |
@snemetz oh, I'm very happy to have your module, don't get me wrong. Your hack is the (almost) the only way to do this currently and that's horrible on the terraform part, not yours <3 |
@walterheck No problem. I believe it could also be done by Terraform calling cloudformation, but I didn't really explore that option. |
Any progess on this PR? @flosell |
@rslotte sorry, no news here. There's one question for the maintainers regarding the upgrade behaviour, other than that this PR would be ready to merge in my opinion. If you haven't already, add a 👍to the PR and possibly the related issues. Sometimes this helps prioritising things. |
Any news? Anything the community can do to get this merged? @flosell |
This would be a great addition to the |
Need this one really hard! |
This is the only thing in my AWS environment i had to manually configure :) |
Any update on this PR? We need this feature! |
Hey, sorry, no update: As far as I'm concerned, this PR is ready, however the upgrade path for existing codebases isn't ideal (see my comment above). If the community waiting for this has any smart ideas how to improve this, I'd be happy to continue working on this. Other than that, the PR is only waiting for feedback from the maintainers. |
They will show up in the diff of terraform, right? Would be "good enough" for me. |
@bjoernhaeuser Yes, it would show up in the plan like this:
So assuming people review terraform plans diligently, it's not too much of an issue. |
@flosell If anyone just applies plans there is always the chance of changes like this, therefore I would be fine with it :) |
Since it appears 1.58.0 is on the horizon, ping? @bflad |
Any update on if this will be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @flosell and everyone waiting. 👋 Thanks for submitting this and apologies for the delayed review here. Please see the below initial feedback and let us know if you have any questions or do not have time to implement the items.
3db6540
to
6940b6c
Compare
…bers to avoid naming collisions
@bflad, thanks for the feedback! The PR is up to date again (resolved merge conflicts) and I fixed the issues following your suggestions.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the updates, @flosell 🚀 This will make a bunch of folks happy. 😄
--- PASS: TestAccAWSBudgetsBudget_prefix (14.72s)
--- PASS: TestAccAWSBudgetsBudget_basic (15.95s)
--- PASS: TestAccAWSBudgetsBudget_notification (47.28s)
This has been released in version 2.5.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
#1879 introduced a basic aws_budgets_budget resource.
This PR adds support for budget notifications via E-Mail or SNS.