Resources

Cost Estimation Reference for Terraform Resources

Pricing dimensions, Terraform examples, and optimization tips for every resource C3X estimates across AWS, Azure, and Google Cloud.

aws_api_gateway_rest_api

A REST API endpoint. Priced per request, with no base hourly fee. Cheaper than ALB at low volume.

Networking
aws_cloudfront_distribution

A CDN distribution. Priced by data transfer to viewers and request count, with rates varying by region.

Networking
aws_cloudtrail

An audit log of AWS API calls. Management events are free. Data events and Insights are billed per event.

Observability
aws_cloudwatch_log_group

A log group for storing application and AWS service logs. Priced by ingestion ($0.50/GB), storage ($0.03/GB-month), and queries.

Observability
aws_db_instance

A managed relational database instance on RDS. Priced per hour by instance class, engine, deployment option, and region, with storage and IOPS billed separately.

Database
aws_dx_connection

A dedicated physical network connection from on-premises to AWS. Priced per port-hour by bandwidth, plus per-GB data transfer at a lower rate than internet.

Networking
aws_dynamodb_table

A managed NoSQL table. Pay-per-request (on-demand) or provisioned capacity, plus storage. No instances to manage.

Database
aws_ebs_volume

A persistent block storage volume. Priced per GB-month by volume type, with separate IOPS and throughput charges on certain types.

Storage
aws_ec2_transit_gateway

A network hub connecting multiple VPCs, VPNs, and Direct Connects. $0.05/hour per attachment plus $0.02/GB processed.

Networking
aws_ecr_repository

A container image registry. Priced per GB-month stored, with the first 500 MB free, plus data transfer charges.

Containers
aws_ecs_cluster

An ECS cluster. The cluster itself is free. Cost comes from the EC2 instances and Fargate tasks that run inside it.

Containers
aws_ecs_service

A long-running ECS service. Cost depends on launch type: EC2 (pay for nodes), Fargate (pay per task vCPU/memory), or Fargate Spot.

Containers
aws_efs_file_system

A managed NFS file system for shared access from EC2, ECS, EKS, and Lambda. Priced per GB stored, with tiered storage classes.

Storage
aws_eip

A static public IPv4 address. Free while attached and in use, $0.005/hour while detached or unassociated. As of 2024, also charges per-hour for attached IPv4 in some scenarios.

Networking
aws_eks_cluster

A managed Kubernetes control plane. Flat $0.10/hour per cluster, with worker nodes and storage billed separately.

Containers
aws_elasticache_cluster

Managed Redis or Memcached. Priced per node-hour by instance type, with no storage or request charges.

Database
aws_glue_job

A managed ETL job using Spark or Python shell. Priced per DPU-hour with 1-minute billing minimum, plus development endpoint and Data Catalog costs.

Database
aws_instance

An EC2 virtual machine. Priced per hour by instance type, OS, tenancy, and region, with separate charges for attached EBS volumes and data transfer.

Compute
aws_kinesis_stream

A real-time data stream. Two capacity modes: Provisioned (priced per shard-hour) or On-Demand (priced per record and per GB).

Messaging
aws_kms_key

A managed encryption key. Flat $1/month per key, plus per-request charges for cryptographic operations.

Security
aws_lambda_function

A serverless function billed by request count and execution duration. Free tier covers 1M requests and 400,000 GB-seconds per month.

Serverless
aws_lb

A managed load balancer (ALB or NLB). Priced per hour plus per LCU/NLCU based on processed traffic.

Networking
aws_msk_cluster

A managed Apache Kafka cluster. Priced per broker-hour by instance type, plus EBS storage per GB-month and data transfer.

Messaging
aws_nat_gateway

A managed NAT gateway for outbound internet access from private subnets. Notoriously expensive: $0.045/hour plus $0.045/GB processed.

Networking
aws_opensearch_domain

A managed OpenSearch (formerly Elasticsearch) cluster. Priced per node-hour by instance type, plus storage and optional UltraWarm/Cold tiers.

Database
aws_rds_cluster

An Aurora cluster (MySQL or PostgreSQL compatible). Priced by per-instance compute, storage by GB used, and I/O (Standard) or compute (I/O-Optimized).

Database
aws_redshift_cluster

A managed data warehouse. Two compute models: classic node-based pricing (per-hour) or Redshift Serverless (per-RPU-hour), plus managed storage.

Database
aws_route53_zone

A DNS hosted zone. Flat $0.50/month per zone, plus tiered per-query charges.

Networking
aws_s3_bucket

Object storage on S3. Priced by storage class, request count, and data transfer, with the bucket itself being free.

Storage
aws_secretsmanager_secret

A managed secret with versioning, rotation, and IAM-controlled access. Flat $0.40/month per secret plus per-API-call charges.

Security
aws_sns_topic

A pub/sub topic for sending notifications. Priced per message published, per delivery, and by destination protocol.

Messaging
aws_sqs_queue

A managed message queue. Priced per request, with no per-queue or storage fee. Generous free tier.

Messaging
aws_vpc_endpoint

A private endpoint into AWS services from your VPC. Gateway endpoints (S3, DynamoDB) are free; Interface endpoints are ~$7/month per AZ plus data fees.

Networking
aws_vpn_connection

A site-to-site IPsec VPN connection between your VPC and on-premises network. $0.05/hour per active connection plus data transfer.

Networking
aws_wafv2_web_acl

A web application firewall. $5/month per Web ACL, $1/month per rule, plus $0.60 per million inspected requests.

Security
azurerm_application_gateway

A Layer 7 load balancer with WAF support. Priced by gateway hours, capacity units, and optional WAF tier.

Networking
azurerm_application_insights

Application performance monitoring. Bills through a linked Log Analytics workspace by GB ingested. Free tier covers 5 GB/month.

Observability
azurerm_container_registry

A managed Docker container registry. Three tiers (Basic, Standard, Premium) with different per-day rates and included storage.

Containers
azurerm_cosmosdb_account

A globally-distributed multi-model database. Priced by Request Units (RU/s) and storage, with provisioned and serverless options.

Database
azurerm_eventhub_namespace

A Kafka-compatible event streaming platform. Tier-based pricing (Basic, Standard, Premium, Dedicated) with throughput units or processing units.

Messaging
azurerm_key_vault

A managed secret, key, and certificate store. Two tiers: Standard (pay-per-operation) and Premium (HSM-backed keys, higher rate).

Security
azurerm_kubernetes_cluster

A managed Kubernetes cluster on AKS. Control plane is free in Standard tier; you pay for the underlying node VMs and disks.

Containers
azurerm_linux_function_app

A serverless function app. Three hosting plans with different cost models: Consumption (per-execution), Premium (always-warm), or App Service Plan (fixed).

Serverless
azurerm_linux_virtual_machine

A Linux VM on Azure. Priced per hour by VM size, region, and license. Managed disks and bandwidth billed separately.

Compute
azurerm_log_analytics_workspace

A workspace for ingesting, storing, and querying logs. Pay-As-You-Go by GB ingested, with optional Commitment Tiers for discounts.

Observability
azurerm_managed_disk

A block storage disk for Azure VMs. Priced by disk type and tier (per-disk for Premium SSD, per-GB for Standard).

Storage
azurerm_postgresql_flexible_server

A managed PostgreSQL server. Priced by compute SKU, storage size, and high-availability mode.

Database
azurerm_redis_cache

A managed Redis cache. Priced per hour by tier (Basic, Standard, Premium, Enterprise) and cache size.

Database
azurerm_service_plan

A compute plan for web apps, API apps, and function apps. Priced per hour by SKU and number of instances.

Compute
azurerm_storage_account

A storage account for Blob, File, Queue, and Table services. Priced by service type, redundancy, access tier, and operations.

Storage
google_artifact_registry_repository

A managed registry for container images, Helm charts, language packages. $0.10/GB-month storage plus data transfer.

Containers
google_bigquery_dataset

A serverless data warehouse dataset. Two pricing models: on-demand ($6.25/TB scanned) or capacity-based (slot-hours).

Database
google_cloud_run_service

A serverless container service. Billed by request count and per-request CPU/memory time. Generous free tier.

Serverless
google_cloudfunctions2_function

A serverless function (2nd gen, Cloud Run-based). Billed per invocation, vCPU-time, memory-time, and outbound networking.

Serverless
google_compute_address

A reserved static IP address. Per-hour charge based on attachment state and IP version (IPv4 vs IPv6).

Networking
google_compute_disk

A block storage disk for Compute Engine VMs. Priced per GB-month by disk type. Hyperdisk adds per-IOPS and per-throughput billing.

Storage
google_compute_instance

A Google Compute Engine VM. Priced per second by machine type, region, and license. Sustained-use discounts apply automatically.

Compute
google_container_cluster

A managed Kubernetes cluster on GKE. Two operating modes: Standard with per-cluster management fee, or Autopilot priced per pod.

Containers
google_dataflow_job

A managed Apache Beam job for streaming and batch data processing. Priced per worker-hour by machine type and tier, plus data processed.

Database
google_logging_project_bucket_config

A bucket for storing GCP logs. Ingestion is $0.50/GiB beyond the free tier; storage beyond 30 days is $0.01/GiB-month.

Observability
google_pubsub_topic

A pub/sub topic for messaging. Priced per TB of message ingestion and delivery, with a generous free tier.

Messaging
google_redis_instance

A managed Redis instance. Priced per GB-hour by service tier (Basic or Standard) and capacity.

Database
google_secret_manager_secret

A managed secret with versioning and IAM access. $0.06/month per active secret version, plus per-access fees beyond the free tier.

Security
google_sql_database_instance

A managed MySQL, PostgreSQL, or SQL Server database. Priced by tier, storage, and HA mode. Sustained-use discounts apply.

Database
google_storage_bucket

Object storage on GCS. Priced by storage class, region, operations, and egress. Lifecycle rules can auto-tier cold data.

Storage