-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for Event Notifications #232
Conversation
& sort lists, where applicable
Plans: Lite, Standard
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.
Also need to update the infracost-usage-example.yml file with an event notification example.
|
||
func getEnSubscriptionRegistryItem() *schema.RegistryItem { | ||
return &schema.RegistryItem{ | ||
Name: "ibm_en_subscription_android", |
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.
is this supposed to be _android?
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.
Yeah, the resource is ibm_en_subscription_android
, however Go really did not like that files had the word Android in them. It kept saying that it could not find the functions that were in the files named that, so that's why for this one it doesn't quite match
|
||
ibm_en_subscription_sms.subscription_sms_standard_no_usage | ||
├─ Outbound IBM Cloud SMS Message Units (Standard plan) Monthly cost depends on usage: $0.01615 per Message Units | ||
└─ SMS Number Setup Resource Units 1 Resource Units $1.00 |
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.
i thought these would be noted as a one-time fee?
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.
Good catch, I forgot to add that note — updated
|
||
var costComponent schema.CostComponent | ||
component_name := "Push Destination Instances" | ||
unit := "PUSH_DESTINATION_INSTANCES" |
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.
it looks like the firefox, huwawei, and chrome, android, iphone, and safari all use the same price and metric (PUSH_DESTINATION_INSTANCES)? it's a lot of redundant code. Would be nice if the code could be reduced for them all to share. not a blocker, but it's a lot of files getting added
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.
Yeah, I definitely agree... I wasn't sure how to consolidate this, since they are different resources and so they use different schemas.
The following Event Notifications resources are now supported:
ibm_en_destination_android
ibm_en_destination_ce
ibm_en_destination_chrome
ibm_en_destination_cos
ibm_en_destination_custom_email
ibm_en_destination_custom_sms
ibm_en_destination_firefox
ibm_en_destination_huawei
ibm_en_destination_ios
ibm_en_destination_msteams
ibm_en_destination_pagerduty
ibm_en_destination_safari
ibm_en_destination_slack
ibm_en_destination_sn
ibm_en_destination_webhook
ibm_en_email_template
ibm_en_ibmsource
ibm_en_integration
ibm_en_integration_cos
ibm_en_slack_template
ibm_en_smtp_configuration
ibm_en_smtp_setting
ibm_en_smtp_user
ibm_en_source
ibm_en_subscription_android
ibm_en_subscription_ce
ibm_en_subscription_chrome
ibm_en_subscription_cos
ibm_en_subscription_custom_email
ibm_en_subscription_email
ibm_en_subscription_firefox
ibm_en_subscription_huawei
ibm_en_subscription_ios
ibm_en_subscription_msteams
ibm_en_subscription_pagerduty
ibm_en_subscription_safari
ibm_en_subscription_slack
ibm_en_subscription_sms
ibm_en_subscription_sn
ibm_en_subscription_webhook
ibm_en_topic
ibm_en_webhook_template
Note: There is no support for
ibm_en_subscription_custom_sms
, since a quote needs to be provided by IBM over e-mail following a formal request.