infracost: Pricing discrepancy between HCL parser and state file breakdowns
Bug report: I did experience something weird when testing the HCL parser feature. The displayed price was more than twice that was accused by the breakdown on the state file itself.
Here’s the infracost breakdown
I’ve run on the state file:
$ infracost breakdown --terraform-use-state --path=.
Detected Terraform directory at .
✔ Running terraform show
✔ Extracting only cost-related params from terraform
✔ Retrieving cloud prices to calculate costs
Project: REDACTED
Name Monthly Qty Unit Monthly Cost
aws_dms_replication_instance.REDACTED
└─ Instance (t3.large) 730 hours $108.70
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED["smtp1"]
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED["smtp2"]
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_s3_bucket.REDACTED
└─ Standard
├─ Storage Monthly cost depends on usage: $0.023 per GB
├─ PUT, COPY, POST, LIST requests Monthly cost depends on usage: $0.005 per 1k requests
├─ GET, SELECT, and all other requests Monthly cost depends on usage: $0.0004 per 1k requests
├─ Select data scanned Monthly cost depends on usage: $0.002 per GB
└─ Select data returned Monthly cost depends on usage: $0.0007 per GB
aws_s3_bucket.REDACTED
└─ Standard
├─ Storage Monthly cost depends on usage: $0.023 per GB
├─ PUT, COPY, POST, LIST requests Monthly cost depends on usage: $0.005 per 1k requests
├─ GET, SELECT, and all other requests Monthly cost depends on usage: $0.0004 per 1k requests
├─ Select data scanned Monthly cost depends on usage: $0.002 per GB
└─ Select data returned Monthly cost depends on usage: $0.0007 per GB
google_bigquery_dataset.REDACTED
└─ Queries (on-demand) Monthly cost depends on usage: $5.00 per TB
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n2-standard-16) 1,460 hours $274.46
└─ Standard provisioned storage (pd-standard) 200 GiB $8.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n2d-highmem-2) 2,190 hours $60.40
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-16) 2,920 hours $1,814.94
└─ Standard provisioned storage (pd-standard) 400 GiB $16.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-highcpu-32) 1,460 hours $1,339.85
└─ Standard provisioned storage (pd-standard) 200 GiB $8.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-4) 730 hours $1,361.21
└─ Standard provisioned storage (pd-standard) 100 GiB $4.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n1-standard-16) 14,600 hours $2,336.00
└─ Standard provisioned storage (pd-standard) 2,000 GiB $80.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-16) 5,840 hours $3,629.88
└─ Standard provisioned storage (pd-standard) 800 GiB $32.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-highmem-32) 730 hours $1,224.19
└─ Standard provisioned storage (pd-standard) 100 GiB $4.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-8) 2,920 hours $776.72
└─ Standard provisioned storage (pd-standard) 400 GiB $16.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n1-standard-4) 730 hours $29.20
└─ Standard provisioned storage (pd-standard) 100 GiB $4.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-2) 730 hours $48.54
└─ SSD provisioned storage (pd-ssd) 50 GiB $8.50
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_sql_database_instance.REDACTED
├─ SQL instance (db-f1-micro, zonal) 730 hours $7.67
├─ Storage (SSD, zonal) 10 GB $1.70
├─ Backups Monthly cost depends on usage: $0.08 per GB
├─ IP address (if unused) 730 hours $7.30
└─ Replica
├─ SQL instance (db-f1-micro, zonal) 730 hours $7.67
└─ Storage (SSD, zonal) 10 GB $1.70
google_sql_database_instance.REDACTED
├─ SQL instance (db-g1-small, zonal) 730 hours $25.55
├─ Storage (SSD, zonal) 10 GB $1.70
├─ Backups Monthly cost depends on usage: $0.08 per GB
├─ IP address (if unused) 730 hours $7.30
└─ Replica
├─ SQL instance (db-g1-small, zonal) 730 hours $25.55
└─ Storage (SSD, zonal) 10 GB $1.70
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
module.REDACTED.google_container_cluster.primary
├─ Cluster management fee 730 hours $73.00
├─ node_pool[0]
│ ├─ Instance usage (Linux/UNIX, on-demand, n1-highmem-2) 730 hours $95.96
│ └─ Standard provisioned storage (pd-standard) 100 GiB $6.00
└─ node_pool[1]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4) 4,380 hours $924.69
└─ Standard provisioned storage (pd-standard) 600 GiB $36.00
module.REDACTED.google_container_node_pool.main[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4) 4,380 hours $924.69
└─ Standard provisioned storage (pd-standard) 600 GiB $36.00
module.REDACTED.google_container_node_pool.monitoring[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-highmem-2) 730 hours $95.96
└─ Standard provisioned storage (pd-standard) 100 GiB $6.00
module.REDACTED.google_container_registry.registry
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
module.REDACTED.google_container_cluster.primary
├─ Cluster management fee 730 hours $73.00
└─ node_pool[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-2) 2,190 hours $145.63
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
module.REDACTED.google_container_node_pool.main[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-2) 2,190 hours $145.63
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
module.REDACTED.google_container_registry.registry
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
OVERALL TOTAL $15,870.99
──────────────────────────────────
266 cloud resources were detected, rerun with --show-skipped to see details:
∙ 43 were estimated, 42 include usage-based costs, see https://infracost.io/usage-file
∙ 2 weren't estimated, report them in https://github.com/infracost/infracost
∙ 221 were free
Update: A new version of Infracost is available: v0.9.18 → v0.9.19
$ curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
Now, the HCL parser output:
# Breakdown from .tf files
$ infracost breakdown --path=. --terraform-parse-hcl
Detected Terraform directory (HCL) at .
✔ Retrieving cloud prices to calculate costs
Project: REDACTED
Name Monthly Qty Unit Monthly Cost
aws_dms_replication_instance.REDACTED
└─ Instance (t3.large) 730 hours $0.00
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED["smtp1"]
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED["smtp2"]
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_route53_record.REDACTED
├─ Standard queries (first 1B) Monthly cost depends on usage: $0.40 per 1M queries
├─ Latency based routing queries (first 1B) Monthly cost depends on usage: $0.60 per 1M queries
└─ Geo DNS queries (first 1B) Monthly cost depends on usage: $0.70 per 1M queries
aws_s3_bucket.REDACTED
└─ Standard
├─ Storage Monthly cost depends on usage: $0.00 per GB
├─ PUT, COPY, POST, LIST requests Monthly cost depends on usage: $0.00 per 1k requests
├─ GET, SELECT, and all other requests Monthly cost depends on usage: $0.00 per 1k requests
├─ Select data scanned Monthly cost depends on usage: $0.00 per GB
└─ Select data returned Monthly cost depends on usage: $0.00 per GB
aws_s3_bucket.REDACTED
└─ Standard
├─ Storage Monthly cost depends on usage: $0.00 per GB
├─ PUT, COPY, POST, LIST requests Monthly cost depends on usage: $0.00 per 1k requests
├─ GET, SELECT, and all other requests Monthly cost depends on usage: $0.00 per 1k requests
├─ Select data scanned Monthly cost depends on usage: $0.00 per GB
└─ Select data returned Monthly cost depends on usage: $0.00 per GB
google_bigquery_dataset.REDACTED
└─ Queries (on-demand) Monthly cost depends on usage: $5.00 per TB
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n2-standard-16) 4,380 hours $823.37
└─ Standard provisioned storage (pd-standard) 600 GiB $24.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n2d-highmem-2) 6,570 hours $181.21
└─ Standard provisioned storage (pd-standard) 900 GiB $36.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-16) 8,760 hours $5,444.82
└─ Standard provisioned storage (pd-standard) 1,200 GiB $48.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-highcpu-32) 4,380 hours $4,019.56
└─ Standard provisioned storage (pd-standard) 600 GiB $24.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-4) 2,190 hours $340.30
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n1-standard-16) 43,800 hours $7,008.00
└─ Standard provisioned storage (pd-standard) 6,000 GiB $240.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-standard-16) 17,520 hours $10,889.65
└─ Standard provisioned storage (pd-standard) 2,400 GiB $96.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n2-highmem-32) 2,190 hours $3,672.58
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-8) 8,760 hours $2,330.15
└─ Standard provisioned storage (pd-standard) 1,200 GiB $48.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, preemptible, n1-standard-4) 2,190 hours $87.60
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
google_container_node_pool.REDACTED
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-2) 2,190 hours $145.63
└─ SSD provisioned storage (pd-ssd) 150 GiB $25.50
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_subscription.REDACTED
├─ Message delivery data Monthly cost depends on usage: $40.00 per TiB
├─ Retained acknowledged message storage Monthly cost depends on usage: $0.27 per GiB
└─ Snapshot message backlog storage Monthly cost depends on usage: $0.27 per GiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_pubsub_topic.REDACTED
└─ Message ingestion data Monthly cost depends on usage: $40.00 per TiB
google_sql_database_instance.REDACTED
├─ SQL instance (db-f1-micro, zonal) 730 hours $7.67
├─ Storage (SSD, zonal) 10 GB $1.70
├─ Backups Monthly cost depends on usage: $0.08 per GB
└─ IP address (if unused) 730 hours $7.30
google_sql_database_instance.REDACTED
├─ SQL instance (db-g1-small, zonal) 730 hours $25.55
├─ Storage (SSD, zonal) 10 GB $1.70
├─ Backups Monthly cost depends on usage: $0.08 per GB
└─ IP address (if unused) 730 hours $7.30
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
google_storage_bucket.REDACTED
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
module.REDACTED.google_container_cluster.primary
└─ Cluster management fee 730 hours $73.00
module.REDACTED.google_container_node_pool.main[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4) 4,380 hours $924.69
└─ Standard provisioned storage (pd-standard) 600 GiB $36.00
module.REDACTED.google_container_node_pool.monitoring[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-highmem-2) 730 hours $95.96
└─ Standard provisioned storage (pd-standard) 100 GiB $6.00
module.REDACTED.google_container_registry.registry
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
module.REDACTED.google_container_cluster.primary
└─ Cluster management fee 730 hours $73.00
module.REDACTED.google_container_node_pool.main[0]
├─ Instance usage (Linux/UNIX, on-demand, n1-standard-2) 2,190 hours $145.63
└─ Standard provisioned storage (pd-standard) 300 GiB $12.00
module.REDACTED.google_container_registry.registry
├─ Storage (standard) Monthly cost depends on usage: $0.026 per GiB
├─ Object adds, bucket/object list (class A) Monthly cost depends on usage: $0.05 per 10k operations
├─ Object gets, retrieve bucket/object metadata (class B) Monthly cost depends on usage: $0.004 per 10k operations
└─ Network egress
├─ Data transfer in same continent Monthly cost depends on usage: $0.01 per GB
├─ Data transfer to worldwide excluding Asia, Australia (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to Asia excluding China, but including Hong Kong (first 1TB) Monthly cost depends on usage: $0.12 per GB
├─ Data transfer to China excluding Hong Kong (first 1TB) Monthly cost depends on usage: $0.23 per GB
└─ Data transfer to Australia (first 1TB) Monthly cost depends on usage: $0.19 per GB
OVERALL TOTAL $36,937.88
──────────────────────────────────
266 cloud resources were detected, rerun with --show-skipped to see details:
∙ 43 were estimated, 42 include usage-based costs, see https://infracost.io/usage-file
∙ 2 weren't estimated, report them in https://github.com/infracost/infracost
∙ 221 were free
Add cost estimates to your pull requests: https://infracost.io/cicd
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Thanks @7onn , your help with this has been so useful. We’ve got another fix inflight for
terraform-use-state
https://github.com/infracost/infracost/pull/1508 particulars, which we couldn’t have found without your investigation efforts. We really appreciate it!Tested the new CLI version. My Atlantis workflow
improved a lot in terms of speed 🚀placebp effect hahahaha the HCL parser isn’t defaulting at atlantis-infracost yet.Honestly, I don’t care anymore about the accuracy of the breakdown over the plan file. I’m switching the approach to exclusively parse through HCL.
Thanks a lot guys ❤️
For the
google_container_cluster
it also looks like we’re not picking up thenode_count
attribute of the node pools correctly, so would be good to see what the HCL looks like for that, along with thegoogle_container_node_pool
resources.@hugorut @alikhajeh1 @aliscott
If some further information is required for your investigation, don’t hesitate on asking me =)
@7onn can you possibly try the brand new v0.10 release on your project with
infracost breakdown --path=.
(which parses HCL by default) to see if that works ok now? If so, please close the issue.As part of v0.10 we removed the
--terraform-use-state
flag since we removed the dependency on the Terraform/Terragrunt binary (users can still generate a TF plan JSON and pass that in).I think @aliscott found one of the reasons for my issue. My
google_container_cluster
still has the default node pool withinitial_node_count=1
although we scaled it down to zero replicas (Terraform ignores this field and doesn’t patch it back to 1 replica) in favor ofgoogle_container_node_pool
.Because of this, the HCL parser is counting unexistent machines.
I’ve fixed an issue with the
google_sql_database_instance
resources in https://github.com/infracost/infracost/pull/1455. This was actually the non-HCL breakdown that had the wrong value, because it was picking up a replica when it shouldn’t have been.