broad-zoo-34077
10/14/2022, 8:02 AMmysterious-teacher-68276
10/14/2022, 8:53 AMSSD
for the AmazonFSx
service.
So the key is to modify the `storageCapacityComponent`:
func (r *FSxWindowsFileSystem) storageCapacityCostComponent() *schema.CostComponent {
deploymentOption := r.deploymentOptionValue()
storageType := r.storageTypeValue()
return &schema.CostComponent{
Name: fmt.Sprintf("%v storage", storageType),
Unit: "GB",
UnitMultiplier: decimal.NewFromInt(1),
MonthlyQuantity: decimalPtr(decimal.NewFromInt(r.StorageCapacityGB)),
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("aws"),
Region: strPtr(r.Region),
Service: strPtr("AmazonFSx"),
ProductFamily: strPtr("Storage"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "deploymentOption", Value: strPtr(deploymentOption)},
{Key: "storageType", Value: strPtr(storageType)},
},
},
}
}
AttributeFilters
to target only a single product entry. The easiest way to find the product your targeting is to boot up the cloud pricing db locally and do some queries. You can find out more about this here: https://github.com/infracost/infracost/blob/master/contributing/add_new_resource_guide.md#price-searchmysterious-teacher-68276
10/14/2022, 8:53 AMstocky-salesmen-15167
10/14/2022, 9:00 AMmysterious-teacher-68276
10/14/2022, 9:00 AMstocky-salesmen-15167
10/14/2022, 9:45 AMmysterious-teacher-68276
10/14/2022, 9:45 AMstocky-salesmen-15167
10/14/2022, 9:45 AMstocky-salesmen-15167
10/14/2022, 9:47 AMstocky-salesmen-15167
10/14/2022, 9:58 AMstocky-salesmen-15167
10/14/2022, 10:10 AMhacktoberfest-accepted
label on this PR after review 😉mysterious-teacher-68276
10/14/2022, 10:10 AMmysterious-teacher-68276
10/14/2022, 10:11 AMmysterious-teacher-68276
10/14/2022, 10:12 AM