Skip to content

Commit

Permalink
chore: add some testing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr committed Nov 14, 2023
1 parent cbd5d6f commit 83774b3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Quick and dirty task-list.
- [x] feat: Cost management tags configuration to allow pricing info TODO check cost allocation report
- [x] build: check coverage working on main
- [x] feat: flag or option to control spend, by enforcing a confirmation for usage of the 'cost' api
- [ ] testing: recreate steam box with cost allocation tag enabled
- [ ] testing: recreate steam box with cost allocation tag enabled (current cost 0.53 USD)
## Later
Expand Down
12 changes: 12 additions & 0 deletions scripts/get-costs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# A few examples of the get costs api:
aws ce get-cost-and-usage \
--time-period="Start=2023-11-10,End=2023-11-11" \
--granularity="DAILY" \
--metrics="UnblendedCost" \
--group-by Type=TAG,Key=boxes.boxid
aws ce get-cost-and-usage \
--time-period="Start=2023-11-01,End=2023-11-11" \
--granularity="MONTHLY" \
--metrics="UnblendedCost" \
--group-by Type=TAG,Key=boxes.boxid

2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ program
if (key === "*") {
theme.printBoxHeading("Non-box costs");
} else {
theme.printBoxHeading(box.boxId, "<unknown>");
theme.printBoxHeading(key, "<unknown>");
}
theme.printBoxDetail("Costs (this month)", cost);
});
Expand Down

0 comments on commit 83774b3

Please sign in to comment.