-
Notifications
You must be signed in to change notification settings - Fork 33
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
POL-877 Add Alibaba Cloud CBI #1807
base: master
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
@@ -0,0 +1,426 @@ | |||
name "Alibaba Cloud Common Bill Ingestion daily" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path to file is currently cost/alibaba/Alibaba_Multiple_Files/Alibaba_Daily.pt
This should be all lowercase like the other files in this repository. Consider changing to something like:
cost/alibaba/alibaba_cloud_cbi/alibaba_cloud_cbi.pt
@@ -0,0 +1,426 @@ | |||
name "Alibaba Cloud Common Bill Ingestion daily" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name "Alibaba Cloud Common Bill Ingestion daily" | |
name "Alibaba Cloud Common Bill Ingestion" |
category "Cost" | ||
default_frequency "daily" | ||
info( | ||
version: "0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: "0.1", | |
version: "1.0", |
Version 1.0 is probably fine here
name "Alibaba Cloud Common Bill Ingestion daily" | ||
rs_pt_ver 20180301 | ||
type "policy" | ||
short_description "Downloads cost reports from Alibaba Cloud using daily granularity and then uploads them to a Flexera CBI endpoint." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short_description "Downloads cost reports from Alibaba Cloud using daily granularity and then uploads them to a Flexera CBI endpoint." | |
short_description "Downloads cost reports from Alibaba Cloud using daily granularity and then uploads them to a Flexera CBI endpoint. See the [README](https://github.com/flexera-public/policy_templates/tree/master/cost/alibaba/alibaba_cloud_cbi/) and [docs.flexera.com/flexera/EN/Automation](https://docs.flexera.com/flexera/EN/Automation/AutomationGS.htm) to learn more." |
rs_pt_ver 20180301 | ||
type "policy" | ||
short_description "Downloads cost reports from Alibaba Cloud using daily granularity and then uploads them to a Flexera CBI endpoint." | ||
long_description "This is to be used when daily granularity (multiple files) from Alibaba. Used when costs have been exported on a daily basis for consumption to OSS." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long Description field is not needed
@@ -0,0 +1,283 @@ | |||
name "Alibaba Cloud Common Bill Ingestion Aggregate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would want to support daily granularity in basically all cases. Therefore a Monthly granularity policy is not needed in the Catalog.
# Authentication | ||
############################################################################### | ||
|
||
credentials "auth_aws" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credentials "auth_aws" do | |
credentials "auth_alibaba" do |
datasource "ds_billing_data" do | ||
iterate $ds_dates | ||
request do | ||
auth $auth_aws |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auth $auth_aws | |
auth $auth_alibaba |
############################################################################### | ||
|
||
############################################################################### | ||
# Datasources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Datasources | |
# Datasources & Scripts |
Datasources and Scripts should be in the same section
datasource "ds_billing_period" do | ||
run_script $js_billing_period, $param_billing_period, $param_specific_period | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accompanying 'script' should follow the datasource - e.g., in this case, this datasource should be followed by the script js_billing_period
block currently on line 294.
See https://github.com/flexera-public/policy_templates/blob/master/cost/azure/azure_china_cbi/azure_china_cbi.pt or https://github.com/flexera-public/policy_templates/blob/master/cost/oracle/oracle_cbi/oracle_cbi.pt for examples
|
||
credentials "auth_flexera" do | ||
schemes "oauth2" | ||
label "flexera" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label "flexera" | |
label "Flexera" |
Description
Allows us to ingest both historic, single file imports, and daily, multi file exports into Flexera.
Issues Resolved
New functionality
Link to Example Applied Policy
Historic billing data import
https://ibm.app.flexera.com/orgs/35130/automation/applied-policies/projects/136970?policyId=65c5127a8e86c40001ae437d
Daily granularity import
https://ibm.app.flexera.com/orgs/35130/automation/applied-policies/projects/136970?policyId=65c5122ab7ceed00016c4189
Contribution Check List