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

Generic aws_budgets_budget doesn't support dynamic use of cost_filters #8331

Closed
pitthecat opened this issue Apr 16, 2019 · 2 comments
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/budgets Issues and PRs that pertain to the budgets service.

Comments

@pitthecat
Copy link

pitthecat commented Apr 16, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

0.11.13

Affected Resource(s)

aws_budgets_budget

Expected Behavior

I created an generic module, which can create AWS budgets

resource "aws_budgets_budget" "cost" {
  name              = "${var.budget_name}"
  budget_type       = "${var.budget_type}"
  limit_amount      = "${var.limit_amount}"
  limit_unit        = "${var.limit_unit}"  
  time_period_start = "${var.time_period_start}"
  time_unit         = "${var.time_unit}"

  cost_filters = {
    Service = "${var.service_filter}"
  }

  notification {
    comparison_operator = "${var.comparison_operator}"
    threshold = "${var.threshold}"
    threshold_type = "${var.threshold_type}"
    notification_type = "${var.notification_type}"
    subscriber_sns_topic_arns = ["${var.sns_arn}"]  
  }
}

For some use cases I want to have a cost_filter and for some use cases I don't want to filter at all.

Actual Behavior

cost_filter is optional, but as soon as I use

 cost_filters = {
    Service = "${var.service_filter}"
  }

It sets cost_filters.% to 1 and even if I set service_filter to "" or "*" it doesn't select a single service and the budget is not working. It doesn't support empty strings or wildcards.

It would be good to have the option to set cost_filters.% to "0" to disable filtering in an instance of the generic budget module or to allow wildcards/empty strings to select all services

@pitthecat pitthecat changed the title Generic AWS Budgets doesn't support cost.filters Generic AWS Budgets doesn't support dynamic use of cost.filters Apr 16, 2019
@pitthecat pitthecat changed the title Generic AWS Budgets doesn't support dynamic use of cost.filters Generic aws_budgets_budget doesn't support dynamic use of cost.filters Apr 16, 2019
@pitthecat pitthecat changed the title Generic aws_budgets_budget doesn't support dynamic use of cost.filters Generic aws_budgets_budget doesn't support dynamic use of cost_filters Apr 16, 2019
@aeschright aeschright added the needs-triage Waiting for first response or review from a maintainer. label Jun 19, 2019
@aeschright aeschright added the service/budgets Issues and PRs that pertain to the budgets service. label Jul 2, 2019
@aeschright aeschright added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 13, 2019
@ewbankkit
Copy link
Contributor

@pitthecat Thanks for raising this issue.
It has already been noticed in #13288 and #5890. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/budgets Issues and PRs that pertain to the budgets service.
Projects
None yet
Development

No branches or pull requests

3 participants