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

aws_budgets_budget cannot rename budget name #4616

Closed
heycasey opened this issue May 22, 2018 · 5 comments
Closed

aws_budgets_budget cannot rename budget name #4616

heycasey opened this issue May 22, 2018 · 5 comments
Labels
bug Addresses a defect in current functionality. service/budgets Issues and PRs that pertain to the budgets service.
Milestone

Comments

@heycasey
Copy link

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

Terraform v0.11.7
+ provider.aws v1.19.0

Affected Resource(s)

  • aws_budgets_budget

Terraform Configuration Files

resource "aws_budgets_budget" "account" {
  name = "monthly_5k"
  budget_type = "COST"
  limit_amount = "5000"
  limit_unit = "USD"
  time_period_start = "2018-01-01_00:00"
  time_unit = "MONTHLY"
}

Crash Behavior

Error: Error applying plan:

1 error(s) occurred:

* aws_budgets_budget.account: 1 error(s) occurred:

* aws_budgets_budget.account: update budget failed: NotFoundException: [Exception=NotFoundException]Failed to call UpdateBudget - Unable to get budget: monthly_5k_2 - the budget doesn't exist.
        status code: 400, request id: 9875d75d-5e0f-11e8-ad7a-899141acb82c

Expected Behavior

The budget should be updated to reflect the new name.

Actual Behavior

Crash with the output displayed above.

Steps to Reproduce

  • Run terraform apply to create the budget.
  • Rename the name argument to anything else. In this case, I renamed it to monthly_5k_2
  • Re-run terraform apply

Important Factoids

Given the nature of the CreateBudget and UpdateBudget API behavior, perhaps a budget rename requires the existing resource to be deleted and a new one created?

@saravanan30erd
Copy link
Contributor

saravanan30erd commented May 23, 2018

@heycasey Correct, name can't be edited and we need to delete and recreate.

saravanan30erd added a commit to saravanan30erd/terraform-provider-aws that referenced this issue May 23, 2018
@saravanan30erd
Copy link
Contributor

PR submitted #4656

@bflad bflad added bug Addresses a defect in current functionality. service/budgets Issues and PRs that pertain to the budgets service. labels May 25, 2018
bflad added a commit that referenced this issue May 25, 2018
issue #4616 aws_budgets_budget cannot rename budget name
@bflad bflad added this to the v1.21.0 milestone May 25, 2018
@bflad
Copy link
Contributor

bflad commented May 25, 2018

Thanks for this report @heycasey and for the fix @saravanan30erd -- #4656 has been merged and will release with v1.21.0 of the AWS provider, likely middle of next week.

@bflad bflad closed this as completed May 25, 2018
@bflad
Copy link
Contributor

bflad commented May 31, 2018

This has been released in version 1.21.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 5, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/budgets Issues and PRs that pertain to the budgets service.
Projects
None yet
Development

No branches or pull requests

3 participants