No description
Find a file
2024-09-10 08:56:28 -05:00
legacy legacy; add apm_cost_category_xlsx.py 2023-11-15 10:56:11 -06:00
.gitignore add az rg apmid cc to cost_categories script 2024-06-05 10:47:32 -05:00
apm_cost_category_xlsx.py support gcp and azure in apm, fix tags in costcenter, validated by customer 2024-09-09 10:23:17 -05:00
azure_cost_categories.py ignore azure when looking at tags 2024-06-04 08:26:23 -05:00
cloud_connectors_xlsx.py update cloud connectors with new cloud account 2024-08-09 08:31:17 -05:00
cluster_connectors.py delegate count 2023-10-11 10:20:49 -05:00
common.py not self reference 2024-09-10 08:56:28 -05:00
core_tags_cost_category.py add core_tags_cost_category.py 2023-09-28 15:48:37 -05:00
cost_categories_xlsx.py case insensitive match for apm cc to az rg cc 2024-06-05 11:52:25 -05:00
costcenter_cost_category_xlsx.py support gcp and azure in apm, fix tags in costcenter, validated by customer 2024-09-09 10:23:17 -05:00
get_azure_cost_categories.py add get azure script 2024-04-04 16:18:40 -05:00
get_cloud_connectors.py no : in filenames 2023-08-23 10:40:41 -05:00
get_cost_categories.py double quotes for commas 2024-02-06 11:20:49 -06:00
get_recommendation.py add price 2023-09-06 13:21:09 -05:00
get_users.py get users 2023-09-07 11:37:16 -05:00
governance_export.py add report 2023-08-09 11:08:57 -05:00
README.md add cost cat csv script 2023-11-06 11:43:10 -06:00

ccm-python

create cloud connectors and cost categories using python

csv files

these scripts expect csv files. if you are using the excel file format you will need to save it as a csv (comma delimited)

authentication

the following environment variables should be set:

HARNESS_PLATFORM_API_KEY: a harness api key

HARNESS_ACCOUNT_ID: your harness account identifier

cost_categories.py

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]

cost_categories_xlsx.py

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_cost_categories.py

get a CSV report of a cost category

usage: python3 get_cost_categories.py [cc name]

core_tags_cost_category.py

create the core tags cost category

usage: usage: core_tags_cost_catagory.py [core tags cc name] [xlsx]

cloud_connectors.py

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]

cluster_connectors.py

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_cloud_connectors.py

get the status of all AWS, Azure, and GCP cloud connectors, output into a csv

usage: get_cloud_connectors.py

governance_export.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