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

[TechDebt]: Add PreCheck step to CostExplorer acceptance tests #38465

Closed
jar-b opened this issue Jul 22, 2024 · 2 comments · Fixed by #38529
Closed

[TechDebt]: Add PreCheck step to CostExplorer acceptance tests #38465

jar-b opened this issue Jul 22, 2024 · 2 comments · Fixed by #38529
Labels
service/ce Issues and PRs that pertain to the ce service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@jar-b
Copy link
Member

jar-b commented Jul 22, 2024

Description

Several cost explorer acceptance tests can fail when run in a non-payer account.

image
=== NAME  TestAccCECostCategory_basic
    cost_category_test.go:30: Step 1/2 error: Error running apply: exit status 1

        Error: creating Cost Explorer Cost Category (tf-acc-test-7704009361025491562): operation error Cost Explorer: CreateCostCategoryDefinition, https response error StatusCode:
400, RequestID: 79b0c380-fc38-462d-87bb-7cdf3b6934d0, api error AccessDeniedException: Failed to create Cost Category: Linked account doesn't have access to cost category.

          with aws_ce_cost_category.test,
          on terraform_plugin_test.tf line 12, in resource "aws_ce_cost_category" "test":
          12: resource "aws_ce_cost_category" "test" {

A PreCheck step should be added to the affected tests which attempts to run the corresponding List API call and skips the test if an AccessDenied error is returned.

% aws ce list-cost-category-definitions

An error occurred (AccessDeniedException) when calling the ListCostCategoryDefinitions operation: Failed to list Cost Categories: Linked account doesn't have access to cost category.

References

No response

Would you like to implement a fix?

None

@jar-b jar-b added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. service/ce Issues and PRs that pertain to the ce service. labels Jul 22, 2024
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.

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.61.0 milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/ce Issues and PRs that pertain to the ce service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant