Add support for Google Cloud Run #1361
Labels
google
Issue related to Google Cloud
new resources
New cloud resources to be added
next release
Issue will be resolved with the next release of Infracost.
Google pricing: https://cloud.google.com/run/pricing
Terraform resources:
Details
google_cloud_run_service
We will need to extract the following attributes from the Terraform:
template.spec.containers[*].resources.limits.cpu
template.spec.containers[*].resources.limits.memory
template.metadata.annotations["autoscaling.knative.dev/minScale"]
template.metadata.annotations["run.googleapis.com/cpu-throttling"]
(this is true by default)And add the following usage attributes:
monthly_requests
average_request_duration
concurrent_requests_per_instance
instance_hrs
The cost components will then be calculated as:
instance_hrs
is specified use that, otherwise use the min scale value * 730 for the instance hours.monthly_requests
usage valueThe prices for all the cost components are also based on whether the region of the resource is a Tier 1 or Tier 2 region. We might need to define a static mapping for these initially.
google_cloud_run_v2_service
This uses the same logic as the
google_cloud_run_service
resource but the attributes are slightly different:template.containers[*].resources.limits.cpu
template.containers[*].resources.limits.memory
template.scaling.min_instance_count
template.containers[*].resources.limits.cpu_idle
google_cloud_run_v2_job
We will need to extract the following attributes from the Terraform:
template.template.containers[*].resources.limits.cpu
template.template.containers[*].resources.limits.memory
template.task_count
Pricing again depends on if the region is a tier 1 or tier 2 region.
And add the following usage attributes:
monthly_job_executions
average_task_execution_mins
The cost components will then be calculated as:
These resources can be added as free resources:
google_cloud_run_service_iam_policy
google_cloud_run_service_iam_binding
google_cloud_run_service_iam_member
google_cloud_run_domain_mapping
google_cloud_run_v2_job_iam
google_cloud_run_v2_service_iam
The text was updated successfully, but these errors were encountered: