I'm working on usage data schema and was thinking ...
# contributors
I'm working on usage data schema and was thinking if the usageSchema should be defined per resource (be part of the core resource) or per resource-IAC. Are there any cases where we need different usage data for different iacs?
@crooked-daybreak-55253 is writing up an issue about how the usageSchema could become a specification for all inputs to a resource, so you could even run Infracost against just the usage file without any Terraform/other IaC code. I'll let him explain more when he has the ticket. But with this in mind, I think per resource is the ideal. So we separate what the inputs are for a resource, and the logic for how each IaC tool maps to those inputs.
👌 1
So I will move the discussion to the issue when it's ready.
Yeah so the summary of what I’m thinking is: 1. It should be possible to specify every argument in the usage file (overriding arguments parsed from IaC). So the schema for all args would be per resource. 2. The IaC resource would know which args are “usage-only” (can’t be determined from the IaC config). Those usage-only args are what would be populated with default values by the sync-usage command.