Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cloudrun/module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ resource "google_cloud_run_v2_service" "service" {
containers {
image = "${local.service_image_url}@${docker_registry_image.push.sha256_digest}"
resources {
cpu_idle = var.cpu_idle
limits = merge(
{
cpu = var.cpus
Expand Down
6 changes: 6 additions & 0 deletions cloudrun/module/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ variable "memory_mb" {
default = 512
}

variable "cpu_idle" {
description = "Determines whether CPU is only allocated during requests"
type = bool
default = true
}

variable "cpus" {
description = "The amount of cpus to allocate to the CloudRun service"
type = number
Expand Down