{"id":13819822,"url":"https://github.com/googleinterns/terraform-cost-estimation","last_synced_at":"2025-05-16T07:32:12.797Z","repository":{"id":38379593,"uuid":"274729323","full_name":"googleinterns/terraform-cost-estimation","owner":"googleinterns","description":"Cost Estimation for GCP infrastructure deployed by Terraform","archived":true,"fork":false,"pushed_at":"2022-06-05T20:41:12.000Z","size":14726,"stargazers_count":11,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-19T19:43:39.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleinterns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-24T17:28:27.000Z","updated_at":"2023-08-08T20:14:14.000Z","dependencies_parsed_at":"2022-07-12T02:17:11.521Z","dependency_job_id":null,"html_url":"https://github.com/googleinterns/terraform-cost-estimation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fterraform-cost-estimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fterraform-cost-estimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fterraform-cost-estimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fterraform-cost-estimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleinterns","download_url":"https://codeload.github.com/googleinterns/terraform-cost-estimation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254488364,"owners_count":22079417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T08:00:53.488Z","updated_at":"2025-05-16T07:32:11.915Z","avatar_url":"https://github.com/googleinterns.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Cost Estimation for GCP infrastructure deployed by Terraform\n[![Build Status](https://travis-ci.org/googleinterns/terraform-cost-estimation.svg?branch=master)](https://travis-ci.org/googleinterns/terraform-cost-estimation)\n\nThe terraform-cost-estimation project will surface a before/after cost\nestimation for GCP infrastructure deployed by Terraform.\n\n**This is not an officially supported Google product.**\n\nDisplay before/after cost estimation of resources from Terraform plan files in JSON format.\n\nResources supported:\n- **google_compute_instance**\n\nCurrently in production:\n- **google_compute_disk**\n\n## Usage\nIn the command line, run: \n```\n$ go run main.go [OPTIONS] FILES\n```\n## Options\n- **format**\n\t- Write the pricing information in the specified format.\n\t- Can be set to: txt, json, html.\n\t- If omitted, it defaults to 'txt'.\n\n- **output**\n\t- Write the cost estimations to the given paths.\n\t- If set to 'stdout', all the outputs will be shown in the command line.\n\t- Multiple output file names must be delimited by ','.\n\t- Mixed file names and stdout values are allowed.\n\n## Examples\n### Usage on command line:\n```\n$ go run main.go input.json\n$ go run main.go -output=json input.json\n$ go run main.go -format=html -output=out1.html,out2.html input1.json input2.json\n```\n\n### Plain text output:\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n│ The total cost change for all Resources is 0.047500 USD/hour.                                               │\n├─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┤\n│                                             Pricing Information                                             │\n│                                                   (USD/h)                                                   │\n├─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┤\n│ Name                │ ID                  │ Type                │ Action              │ Delta               │\n├─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┤\n│ test1               │ 730331501208101640  │ n1-standard-2       │ update              │ 0.047500            │\n└─────────────────────┴─────────────────────┴─────────────────────┴─────────────────────┴─────────────────────┘\n \n List of all Resources:\n \n┌─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┐\n│ Name                │                                         test1                                         │\n├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤\n│ ID                  │                                   730331501208101640                                  │\n├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤\n│ Zone                │                                     us-central1-b                                     │\n├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤\n│ Machine type        │                                    n1-standard-1 -\u003e                                   │\n│                     │                                    -\u003e n1-standard-2                                   │\n├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤\n│ Action              │                                         update                                        │\n├─────────────────────┴───────────────────────────────────────────────────────────────────────────────────────┤\n│                                             Pricing Information                                             │\n│                                                   (USD/h)                                                   │\n├───────────────────────────────────────────┬─────────────────────┬─────────────────────┬─────────────────────┤\n│                                           │ CPU                 │ RAM                 │ Total               │\n├─────────────────────┬─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┤\n│ Before              │ Cost                │ 0.031611            │ 0.004237            │ 0.047500            │\n│                     │ per                 │                     │                     │                     │\n│                     │ unit                │                     │                     │                     │\n│                     ├─────────────────────┼─────────────────────┼─────────────────────┼                     │\n│                     │ Number              │ 1                   │ 3.75                │                     │\n│                     │ of                  │                     │                     │                     │\n│                     │ units               │                     │                     │                     │\n│                     ├─────────────────────┼─────────────────────┼─────────────────────┼                     │\n│                     │ Units               │ 0.031611            │ 0.015889            │                     │\n│                     │ cost                │                     │                     │                     │\n├─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┤\n│ After               │ Cost                │ 0.031611            │ 0.004237            │ 0.095000            │\n│                     │ per                 │                     │                     │                     │\n│                     │ unit                │                     │                     │                     │\n│                     ├─────────────────────┼─────────────────────┼─────────────────────┼                     │\n│                     │ Number              │ 2                   │ 7.50                │                     │\n│                     │ of                  │                     │                     │                     │\n│                     │ units               │                     │                     │                     │\n│                     ├─────────────────────┼─────────────────────┼─────────────────────┼                     │\n│                     │ Units               │ 0.063222            │ 0.031778            │                     │\n│                     │ cost                │                     │                     │                     │\n├─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┼─────────────────────┤\n│ DELTA               │ UP (↑)              │ 0.031611            │ 0.01588875          │ 0.04749975          │\n└─────────────────────┴─────────────────────┴─────────────────────┴─────────────────────┴─────────────────────┘\n```\n### Html output:\n\n\u003cimg src=\"images/html_output.png\" width=\"1300\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Fterraform-cost-estimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleinterns%2Fterraform-cost-estimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Fterraform-cost-estimation/lists"}