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 planname to logdna cost component #168

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,20 @@
├─ Key versions free allowance (first 5 Key Versions) 5 Key Versions $0.00
└─ Key versions 295 Key Versions $317.52

ibm_resource_instance.resource_instance_logdna_14day
└─ Gigabyte Months (14-day) 1 Gigabyte Months $2.15

ibm_resource_instance.resource_instance_logdna_30day
└─ Gigabyte Months (30-day) 1 Gigabyte Months $3.23

ibm_resource_instance.resource_instance_logdna_7day
└─ Gigabyte Months 10 Gigabyte Months $15.00
└─ Gigabyte Months (7-day) 1 Gigabyte Months $1.50

ibm_resource_instance.resource_instance_logdna_7day_no_usage
└─ Gigabyte Months Monthly cost depends on usage: $1.50 per Gigabyte Months
└─ Gigabyte Months (7-day) Monthly cost depends on usage: $1.50 per Gigabyte Months

ibm_resource_instance.resource_instance_logdna_hipaa30day
└─ Gigabyte Months (hipaa-30-day) 1 Gigabyte Months $4.12

ibm_resource_instance.resource_instance_logdna_lite
└─ Lite plan 1 $0.00
Expand Down Expand Up @@ -130,7 +139,7 @@
├─ Class 2 Resource Units 50 RU $0.09
└─ Class 3 Resource Units 50 RU $0.25

OVERALL TOTAL $15,474.55
OVERALL TOTAL $15,470.56
──────────────────────────────────
29 cloud resources were detected:
29 were estimated, all of which include usage-based costs, see https://infracost.io/usage-file
32 cloud resources were detected:
32 were estimated, all of which include usage-based costs, see https://infracost.io/usage-file
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ resource "ibm_resource_instance" "resource_instance_logdna_7day_no_usage" {
plan = "7-day"
location = "us-south"
}
resource "ibm_resource_instance" "resource_instance_logdna_14day" {
name = "logdna-14day"
service = "logdna"
plan = "14-day"
location = "us-south"
}

resource "ibm_resource_instance" "resource_instance_logdna_30day" {
name = "logdna-30day"
service = "logdna"
plan = "30-day"
location = "us-south"
}

resource "ibm_resource_instance" "resource_instance_logdna_hipaa30day" {
name = "logdna-hipaa30day"
service = "logdna"
plan = "hipaa-30-day"
location = "us-south"
}

resource "ibm_resource_instance" "resource_instance_activity_tracker_lite" {
name = "activity-tracker-lite"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ resource_usage:
appid_users: 1000
appid_advanced_authentications: 20000
ibm_resource_instance.resource_instance_logdna_7day:
logdna_gigabyte_months: 10
logdna_gigabyte_months: 1
ibm_resource_instance.resource_instance_logdna_lite:
logdna_gigabyte_months: 10
logdna_gigabyte_months: 11
ibm_resource_instance.resource_instance_logdna_14day:
logdna_gigabyte_months: 1
ibm_resource_instance.resource_instance_logdna_30day:
logdna_gigabyte_months: 1
ibm_resource_instance.resource_instance_logdna_hipaa30day:
logdna_gigabyte_months: 1
ibm_resource_instance.resource_instance_activity_tracker_7day:
activitytracker_gigabyte_months: 10
ibm_resource_instance.resource_instance_activity_tracker_lite:
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/ibm/resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func GetLogDNACostComponents(r *ResourceInstance) []*schema.CostComponent {
}
} else {
return []*schema.CostComponent{{
Name: "Gigabyte Months",
Name: fmt.Sprintf("Gigabyte Months (%s)", r.Plan),
Unit: "Gigabyte Months",
UnitMultiplier: decimal.NewFromInt(1),
MonthlyQuantity: q,
Expand Down
Loading