create cloud connectors and cost categories using python
these scripts expect csv files. if you are using the excel file format you will need to save it as a csv (comma delimited)
the following environment variables should be set:
HARNESS_PLATFORM_API_KEY: a harness api key
HARNESS_ACCOUNT_ID: your harness account identifier
create cost categories in harness based on csvs for each cloud
usage: python3 cost_catagories.py "Unit Group" BU [csv #1] [csv #2] [csv #3]
create cost categories in harness based on xlsx for each cloud
usage: python3 cost_catagories.py "Unit Group" Owners BU [xlsx #1] [xlsx #2] [xlsx #3]
get a CSV report of a cost category
usage: python3 get_cost_categories.py [cc name]
create the core tags cost category
usage: usage: core_tags_cost_catagory.py [core tags cc name] [xlsx]
create cloud connectors based on csv file
[cross account role name] == role name in aws that trusts harness [tenant id] == azure tenant id [service account email] == gcp service account email given in harness ui when creating a gcp connector
usage: cloud_connectors.py [cross account role name] [tenant id] [service account email] [csv #1] [csv #2] [csv #3]
create k8s and k8s ccm connectors for delegates seen at the account level
usage: cluster_connectors.py
By adding anything to the end of the command, we instead just get a list of delegates in your account
usage: cluster_connectors.py list
get the status of all AWS, Azure, and GCP cloud connectors, output into a csv
usage: get_cloud_connectors.py
get all the governance evaluations for a month, output into a csv
usage: governance_export.py
to run for the previous month, specify how many months to go back, example for 2 months ago (in August now, want to get data for June):
usage: governance_export.py 2