You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're thinking of updating our JSON format. We'd ❤️ to hear your feedback about the changes we have in mind (infracost breakdown --path=path/to/code --format json). These changes should make it simpler to write policies with tools like Open Policy Agent (OPA) or HashiCorp's Sentinel.
we'll bump the version from 0.2 to 0.3.
resources will have name, type, and address fields. Previously the name field contained the address. This change follows the convention in the Terraform plan JSON. For example:
{ ... "name": "aws_instance.web_app" ...} will now be stored as: { ... "type": "aws_instance", "name": "web_app", "address": "aws_instance.web_app" ... }
{ ... "name": "module.my_api.module.metric_alarm_target_4xx.aws_cloudwatch_metric_alarm.this[0]" ...} will now be stored as { ... "type": "aws_cloudwatch_metric_alarm", "name": "this[0]", "address": "module.my_api.module.metric_alarm_target_4xx.aws_cloudwatch_metric_alarm.this[0]" ... }
Fields containing prices, costs, and quantities are now numbers instead of strings.
When possible, cost component configuration details will be expanded as a key value list. { "name": "Instance usage (Linux/UNIX, on-demand, m5.4xlarge)" ...} will now be stored as { "name": "Instance usage", "parameters": { "platform": "Linux/UNIX", "purchase_option": "on-demand", "instance_type": "m5.4xlarge" } ... }
This discussion was converted from issue #1260 on January 12, 2022 11:14.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We're thinking of updating our JSON format. We'd ❤️ to hear your feedback about the changes we have in mind (
infracost breakdown --path=path/to/code --format json
). These changes should make it simpler to write policies with tools like Open Policy Agent (OPA) or HashiCorp's Sentinel.we'll bump the
version
from0.2
to0.3
.resources
will havename
,type
, andaddress
fields. Previously thename
field contained the address. This change follows the convention in the Terraform plan JSON. For example:{ ... "name": "aws_instance.web_app" ...}
will now be stored as:{ ... "type": "aws_instance", "name": "web_app", "address": "aws_instance.web_app" ... }
{ ... "name": "module.my_api.module.metric_alarm_target_4xx.aws_cloudwatch_metric_alarm.this[0]" ...}
will now be stored as{ ... "type": "aws_cloudwatch_metric_alarm", "name": "this[0]", "address": "module.my_api.module.metric_alarm_target_4xx.aws_cloudwatch_metric_alarm.this[0]" ... }
Fields containing prices, costs, and quantities are now numbers instead of strings.
When possible, cost component configuration details will be expanded as a key value list.
{ "name": "Instance usage (Linux/UNIX, on-demand, m5.4xlarge)" ...}
will now be stored as{ "name": "Instance usage", "parameters": { "platform": "Linux/UNIX", "purchase_option": "on-demand", "instance_type": "m5.4xlarge" } ... }
A JSON schema for the JSON output is now published at https://github.com/infracost/infracost/blob/master/schema/infracost.schema.json.
Please let us know any ideas/improvements you want to see in our JSON format. What headaches has our old format caused that you want to see rectified?
Beta Was this translation helpful? Give feedback.
All reactions