Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchUsageData ¶ added in v0.10.12
FetchUsageData fetches usage estimates derived from cloud provider reported usage from the Infracost Cloud Usage API for each supported resource in the project
func PopulateActualCosts ¶ added in v0.10.12
func PopulateActualCosts(ctx *config.RunContext, project *schema.Project) error
PopulateActualCosts fetches cloud provider reported costs from the Infracost Cloud Usage API and adds corresponding cost components to the project's resources
func UploadCloudResourceIDs ¶ added in v0.10.13
func UploadCloudResourceIDs(ctx *config.RunContext, project *schema.Project) error
UploadCloudResourceIDs sends the project scoped cloud resource ids to the Usage API, so they can be used to provide usage estimates.
Types ¶
type PriceFetcher ¶ added in v0.10.36
type PriceFetcher struct {
// contains filtered or unexported fields
}
PriceFetcher provides a thread-safe way to aggregate 'price not found' data. This is used to provide a summary of missing prices at the end of a run. It should be used as a singleton which is shared across the application.
func NewPriceFetcher ¶ added in v0.10.36
func NewPriceFetcher(ctx *config.RunContext, warnOnPriceErrors bool) *PriceFetcher
func (*PriceFetcher) LogWarnings ¶ added in v0.10.36
func (p *PriceFetcher) LogWarnings()
LogWarnings writes the PriceFetcher prices to the application log. If the log level is above the debug level we also include resource names the log output.
func (*PriceFetcher) MissingPricesComponents ¶ added in v0.10.36
func (p *PriceFetcher) MissingPricesComponents() []string
MissingPricesComponents returns a map of missing prices by component name, component names are in the format: resource_type.cost_component_name.
func (*PriceFetcher) MissingPricesLen ¶ added in v0.10.36
func (p *PriceFetcher) MissingPricesLen() int
MissingPricesLen returns the number of missing prices.
func (*PriceFetcher) PopulatePrices ¶ added in v0.10.36
func (p *PriceFetcher) PopulatePrices(project *schema.Project) error