Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR represents a number of enhancements to the tool. While it may not be apparent from the diffs, I've tried to retain the original capabilities of the tool while adding new ones and preparing the code for further enhancement.
The major enhancement is integration with Google Sheets to allow the downloaded data to be uploaded to a new sheet in the existing Developer Cloud Expenses spreadsheet, including handling the OAuth 2.0 authentication flow required for access. With this change, the previous manual steps of producing a CSV file, creating a new sheet, pasting and formatting the data from the file into the sheet, and updating the main sheet are no longer required.
The other significant change is a reorganization of the accounts YAML file. Previously, there were only two levels of keys: groups and account IDs. This PR introduces two more levels. Groups are now placed under keys for cloud providers under the root-level
cloud_providers
key. Also at the root, there is aconfiguration
key which holds information about access to OAuth authorization, individual cloud providers, and Google Sheets.I added a command line option,
-output
to allow control over whether the tool produces a local CSV file or uploads directly into GSheets. I also modified the defaults for the options to allow them to be omitted in the typical usage case: by default, the tool pulls data from the previous month and loads it into the configured GSheets spreadsheet.In addition to the above, I've made a number of smaller changes, including:
kooky
packageNormalizeResponse()
to produce typed outputAwsPuller
to allow it to access an explicit AWS profile in the default credentials file.gitignore
file and added entries