Skip to content

Commit

Permalink
add planname to logdna cost component (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltol authored Apr 25, 2024
1 parent 6e76c49 commit a4398bb
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
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

0 comments on commit a4398bb

Please sign in to comment.