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_apiA REST API endpoint. Priced per request, with no base hourly fee. Cheaper than ALB at low volume.
aws_cloudfront_distributionA CDN distribution. Priced by data transfer to viewers and request count, with rates varying by region.
aws_cloudtrailAn audit log of AWS API calls. Management events are free. Data events and Insights are billed per event.
aws_cloudwatch_log_groupA log group for storing application and AWS service logs. Priced by ingestion ($0.50/GB), storage ($0.03/GB-month), and queries.
aws_db_instanceA managed relational database instance on RDS. Priced per hour by instance class, engine, deployment option, and region, with storage and IOPS billed separately.
aws_dx_connectionA 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.
aws_dynamodb_tableA managed NoSQL table. Pay-per-request (on-demand) or provisioned capacity, plus storage. No instances to manage.
aws_ebs_volumeA persistent block storage volume. Priced per GB-month by volume type, with separate IOPS and throughput charges on certain types.
aws_ec2_transit_gatewayA network hub connecting multiple VPCs, VPNs, and Direct Connects. $0.05/hour per attachment plus $0.02/GB processed.
aws_ecr_repositoryA container image registry. Priced per GB-month stored, with the first 500 MB free, plus data transfer charges.
aws_ecs_clusterAn ECS cluster. The cluster itself is free. Cost comes from the EC2 instances and Fargate tasks that run inside it.
aws_ecs_serviceA long-running ECS service. Cost depends on launch type: EC2 (pay for nodes), Fargate (pay per task vCPU/memory), or Fargate Spot.
aws_efs_file_systemA managed NFS file system for shared access from EC2, ECS, EKS, and Lambda. Priced per GB stored, with tiered storage classes.
aws_eipA 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.
aws_eks_clusterA managed Kubernetes control plane. Flat $0.10/hour per cluster, with worker nodes and storage billed separately.
aws_elasticache_clusterManaged Redis or Memcached. Priced per node-hour by instance type, with no storage or request charges.
aws_glue_jobA managed ETL job using Spark or Python shell. Priced per DPU-hour with 1-minute billing minimum, plus development endpoint and Data Catalog costs.
aws_instanceAn EC2 virtual machine. Priced per hour by instance type, OS, tenancy, and region, with separate charges for attached EBS volumes and data transfer.
aws_kinesis_streamA real-time data stream. Two capacity modes: Provisioned (priced per shard-hour) or On-Demand (priced per record and per GB).
aws_kms_keyA managed encryption key. Flat $1/month per key, plus per-request charges for cryptographic operations.
aws_lambda_functionA serverless function billed by request count and execution duration. Free tier covers 1M requests and 400,000 GB-seconds per month.
aws_lbA managed load balancer (ALB or NLB). Priced per hour plus per LCU/NLCU based on processed traffic.
aws_msk_clusterA managed Apache Kafka cluster. Priced per broker-hour by instance type, plus EBS storage per GB-month and data transfer.
aws_nat_gatewayA managed NAT gateway for outbound internet access from private subnets. Notoriously expensive: $0.045/hour plus $0.045/GB processed.
aws_opensearch_domainA managed OpenSearch (formerly Elasticsearch) cluster. Priced per node-hour by instance type, plus storage and optional UltraWarm/Cold tiers.
aws_rds_clusterAn Aurora cluster (MySQL or PostgreSQL compatible). Priced by per-instance compute, storage by GB used, and I/O (Standard) or compute (I/O-Optimized).
aws_redshift_clusterA managed data warehouse. Two compute models: classic node-based pricing (per-hour) or Redshift Serverless (per-RPU-hour), plus managed storage.
aws_route53_zoneA DNS hosted zone. Flat $0.50/month per zone, plus tiered per-query charges.
aws_s3_bucketObject storage on S3. Priced by storage class, request count, and data transfer, with the bucket itself being free.
aws_secretsmanager_secretA managed secret with versioning, rotation, and IAM-controlled access. Flat $0.40/month per secret plus per-API-call charges.
aws_sns_topicA pub/sub topic for sending notifications. Priced per message published, per delivery, and by destination protocol.
aws_sqs_queueA managed message queue. Priced per request, with no per-queue or storage fee. Generous free tier.
aws_vpc_endpointA private endpoint into AWS services from your VPC. Gateway endpoints (S3, DynamoDB) are free; Interface endpoints are ~$7/month per AZ plus data fees.
aws_vpn_connectionA site-to-site IPsec VPN connection between your VPC and on-premises network. $0.05/hour per active connection plus data transfer.
aws_wafv2_web_aclA web application firewall. $5/month per Web ACL, $1/month per rule, plus $0.60 per million inspected requests.
azurerm_application_gatewayA Layer 7 load balancer with WAF support. Priced by gateway hours, capacity units, and optional WAF tier.
azurerm_application_insightsApplication performance monitoring. Bills through a linked Log Analytics workspace by GB ingested. Free tier covers 5 GB/month.
azurerm_container_registryA managed Docker container registry. Three tiers (Basic, Standard, Premium) with different per-day rates and included storage.
azurerm_cosmosdb_accountA globally-distributed multi-model database. Priced by Request Units (RU/s) and storage, with provisioned and serverless options.
azurerm_eventhub_namespaceA Kafka-compatible event streaming platform. Tier-based pricing (Basic, Standard, Premium, Dedicated) with throughput units or processing units.
azurerm_key_vaultA managed secret, key, and certificate store. Two tiers: Standard (pay-per-operation) and Premium (HSM-backed keys, higher rate).
azurerm_kubernetes_clusterA managed Kubernetes cluster on AKS. Control plane is free in Standard tier; you pay for the underlying node VMs and disks.
azurerm_linux_function_appA serverless function app. Three hosting plans with different cost models: Consumption (per-execution), Premium (always-warm), or App Service Plan (fixed).
azurerm_linux_virtual_machineA Linux VM on Azure. Priced per hour by VM size, region, and license. Managed disks and bandwidth billed separately.
azurerm_log_analytics_workspaceA workspace for ingesting, storing, and querying logs. Pay-As-You-Go by GB ingested, with optional Commitment Tiers for discounts.
azurerm_managed_diskA block storage disk for Azure VMs. Priced by disk type and tier (per-disk for Premium SSD, per-GB for Standard).
azurerm_postgresql_flexible_serverA managed PostgreSQL server. Priced by compute SKU, storage size, and high-availability mode.
azurerm_redis_cacheA managed Redis cache. Priced per hour by tier (Basic, Standard, Premium, Enterprise) and cache size.
azurerm_service_planA compute plan for web apps, API apps, and function apps. Priced per hour by SKU and number of instances.
azurerm_storage_accountA storage account for Blob, File, Queue, and Table services. Priced by service type, redundancy, access tier, and operations.
Google Cloud
All Google Cloud resources →google_artifact_registry_repositoryA managed registry for container images, Helm charts, language packages. $0.10/GB-month storage plus data transfer.
google_bigquery_datasetA serverless data warehouse dataset. Two pricing models: on-demand ($6.25/TB scanned) or capacity-based (slot-hours).
google_cloud_run_serviceA serverless container service. Billed by request count and per-request CPU/memory time. Generous free tier.
google_cloudfunctions2_functionA serverless function (2nd gen, Cloud Run-based). Billed per invocation, vCPU-time, memory-time, and outbound networking.
google_compute_addressA reserved static IP address. Per-hour charge based on attachment state and IP version (IPv4 vs IPv6).
google_compute_diskA block storage disk for Compute Engine VMs. Priced per GB-month by disk type. Hyperdisk adds per-IOPS and per-throughput billing.
google_compute_instanceA Google Compute Engine VM. Priced per second by machine type, region, and license. Sustained-use discounts apply automatically.
google_container_clusterA managed Kubernetes cluster on GKE. Two operating modes: Standard with per-cluster management fee, or Autopilot priced per pod.
google_dataflow_jobA managed Apache Beam job for streaming and batch data processing. Priced per worker-hour by machine type and tier, plus data processed.
google_logging_project_bucket_configA bucket for storing GCP logs. Ingestion is $0.50/GiB beyond the free tier; storage beyond 30 days is $0.01/GiB-month.
google_pubsub_topicA pub/sub topic for messaging. Priced per TB of message ingestion and delivery, with a generous free tier.
google_redis_instanceA managed Redis instance. Priced per GB-hour by service tier (Basic or Standard) and capacity.
google_secret_manager_secretA managed secret with versioning and IAM access. $0.06/month per active secret version, plus per-access fees beyond the free tier.
google_sql_database_instanceA managed MySQL, PostgreSQL, or SQL Server database. Priced by tier, storage, and HA mode. Sustained-use discounts apply.
google_storage_bucketObject storage on GCS. Priced by storage class, region, operations, and egress. Lifecycle rules can auto-tier cold data.