Skip to content
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

Merged
merged 55 commits into from
Nov 27, 2024
Merged

Add support for Event Notifications #232

merged 55 commits into from
Nov 27, 2024

Conversation

luisarojas
Copy link
Collaborator

@luisarojas luisarojas commented Nov 24, 2024

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.

& sort lists, where applicable
@luisarojas luisarojas self-assigned this Nov 24, 2024
@luisarojas luisarojas marked this pull request as ready for review November 24, 2024 14:02
Copy link
Collaborator

@hiltol hiltol left a 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",
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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"
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

@luisarojas luisarojas requested a review from hiltol November 26, 2024 22:27
@hiltol hiltol merged commit 53aa782 into master Nov 27, 2024
6 of 7 checks passed
@hiltol hiltol deleted the feat/event-notifications branch November 27, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants