Skip to content

Commit

Permalink
Increase the CPU and Memory for container instance
Browse files Browse the repository at this point in the history
  • Loading branch information
w-t-yang authored Dec 8, 2022
1 parent 8567e52 commit da20109
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ If you decide to manually set up a custom domain for your Cloud Run service, fol
#### Instance Sized
Configure the CPU & memory limits for your Cloud Run instances by adding the following variables to your Terraform module
```
container_requests_cpu = "512m"
container_requests_memory = "1024Mi"
container_limits_cpu = "1.0"
container_limits_memory = "2048Mi"
container_requests_cpu = "1"
container_requests_memory = "4Gi"
container_limits_memory = "4Gi"
```

Expand Down
14 changes: 7 additions & 7 deletions modules/cloud-run/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ variable "container_env" {

variable "container_requests_cpu" {
type = string
default = "512m"
description = "Amount of CPU millicores."
default = "1"
description = "Amount of CPU cores."
}

variable "container_requests_memory" {
type = string
default = "1024Mi"
description = "Amount of memory in MiB"
default = "4Gi"
description = "Amount of memory in GiB"
}

variable "container_limits_cpu" {
type = string
default = "1.0"
default = "2.0"
description = "CPU limit, must be equal to one of [.08-1], 1.0, 2.0, 4.0, 6.0, 8.0"
}

variable "container_limits_memory" {
type = string
default = "2048Mi"
description = "Amount of memory in MiB"
default = "4Gi"
description = "Amount of memory in GiB"
}

variable "container_min_capacity" {
Expand Down
14 changes: 7 additions & 7 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,26 @@ variable "deploy_in_cloud_run" {

variable "container_requests_cpu" {
type = string
default = "512m"
description = "Amount of CPU millicores."
default = "1"
description = "Amount of CPU cores."
}

variable "container_requests_memory" {
type = string
default = "1024Mi"
description = "Amount of memory in MiB"
default = "4Gi"
description = "Amount of memory in Gib"
}

variable "container_limits_cpu" {
type = string
default = "1.0"
default = "2.0"
description = "CPU limit, must be equal to one of [.08-1], 1.0, 2.0, 4.0, 6.0, 8.0"
}

variable "container_limits_memory" {
type = string
default = "2048Mi"
description = "Amount of memory in MiB"
default = "4Gi"
description = "Amount of memory in GiB"
}

variable "container_min_capacity" {
Expand Down

0 comments on commit da20109

Please sign in to comment.