diff --git a/internal/resources/ibm/resource_instance_pm20.go b/internal/resources/ibm/resource_instance_pm20.go index a25d01a6cd9..0d798757719 100644 --- a/internal/resources/ibm/resource_instance_pm20.go +++ b/internal/resources/ibm/resource_instance_pm20.go @@ -35,6 +35,14 @@ func GetWMLCostComponents(r *ResourceInstance) []*schema.CostComponent { Name: "Lite plan", UnitMultiplier: decimal.NewFromInt(1), MonthlyQuantity: decimalPtr(decimal.NewFromInt(1)), + ProductFilter: &schema.ProductFilter{ + VendorName: strPtr("ibm"), + Region: strPtr(r.Location), + Service: &r.Service, + AttributeFilters: []*schema.AttributeFilter{ + {Key: "planName", Value: &r.Plan}, + }, + }, } costComponent.SetCustomPrice(decimalPtr(decimal.NewFromInt(0))) return []*schema.CostComponent{ @@ -42,9 +50,17 @@ func GetWMLCostComponents(r *ResourceInstance) []*schema.CostComponent { } } else { costComponent := schema.CostComponent{ - Name: fmt.Sprintf("Plan %s with customized pricing", r.Plan), + Name: fmt.Sprintf("Plan %s not found", r.Plan), UnitMultiplier: decimal.NewFromInt(1), MonthlyQuantity: decimalPtr(decimal.NewFromInt(1)), + ProductFilter: &schema.ProductFilter{ + VendorName: strPtr("ibm"), + Region: strPtr(r.Location), + Service: &r.Service, + AttributeFilters: []*schema.AttributeFilter{ + {Key: "planName", Value: &r.Plan}, + }, + }, } costComponent.SetCustomPrice(decimalPtr(decimal.NewFromInt(0))) return []*schema.CostComponent{