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

[Bug]: effective_start on aws_ce_cost_category only applied if no other changes #29044

Closed
gavinclarkeuk opened this issue Jan 23, 2023 · 4 comments · Fixed by #30369
Closed
Labels
bug Addresses a defect in current functionality. service/ce Issues and PRs that pertain to the ce service.
Milestone

Comments

@gavinclarkeuk
Copy link

gavinclarkeuk commented Jan 23, 2023

Terraform Core Version

1.3.7

AWS Provider Version

4.50.0

Affected Resource(s)

aws_ce_cost_category recently had a change in #28009 to make the effective_start_date settable, rather than read only. It seems that this only works if there are no other changes to the cost category.

If there are changes to the rule then the effective start date is just set to the beginning of the current month, a second terraform apply with no further changes will correctly update the effective start date.

Expected Behavior

The effective start date should be set even when there are category rule changes

Actual Behavior

If there are rule changes the effective start date is set to the start of the current month (the default)

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_ce_cost_category" "backstage_cost_categories" {
  name         = "MyRule"
  rule_version = "CostCategoryExpression.v1"
  effective_start = "2022-06-01T00:00:00Z"

  rule {
    type = "INHERITED_VALUE"
    inherited_value {
      dimension_name = "TAG"
      dimension_key  = "MyTag"
    }
  }
}

Steps to Reproduce

Change the logic in the rule section and reapply the terraform, you will see the category start date is not set to the one provided. Reapply and the start date will be correct.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@gavinclarkeuk gavinclarkeuk added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jan 23, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/ce Issues and PRs that pertain to the ce service. label Jan 23, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jan 23, 2023
@bebold-jhr
Copy link

bebold-jhr commented Mar 30, 2023

I can confirm this for provider version 4.56.0 and terraform version 1.4.0.
If we change the rules, we have to apply a second time. Otherwise the effective start date is set to the start of the current month. First apply will then apply the changes in the ruleset and the second apply corrects the effective start date to it's original value.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 8, 2023

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 May 8, 2023
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/ce Issues and PRs that pertain to the ce service.
Projects
None yet
3 participants