Created
February 9, 2025 18:38
-
-
Save harith96/a58c546c7ad648ca12c19fa9459a05b3 to your computer and use it in GitHub Desktop.
Terraform module variables for creating a coruld run service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "service_name" { | |
description = "The name of the Cloud Run service" | |
type = string | |
} | |
variable "region" { | |
description = "The region where the Cloud Run service will be deployed" | |
type = string | |
} | |
variable "image" { | |
description = "The container image to deploy" | |
type = string | |
} | |
variable "env_vars" { | |
description = "Environment variables for the container" | |
type = list(object({ | |
name = string | |
value = string | |
})) | |
default = [] | |
} | |
variable "ports" { | |
description = "Ports to expose on the container" | |
type = list(number) | |
default = [] | |
} | |
variable "resource_limits" { | |
description = "Resource limits for the container" | |
type = object({ | |
cpu = string | |
memory = string | |
}) | |
default = { | |
cpu = "1" | |
memory = "512Mi" | |
} | |
} | |
variable "liveness_probe" { | |
description = "Liveness probe configuration" | |
type = list(object({ | |
path = string | |
port = number | |
initial_delay_seconds = number | |
period_seconds = number | |
})) | |
default = [] | |
} | |
variable "startup_probe" { | |
description = "Startup probe configuration" | |
type = list(object({ | |
path = string | |
port = number | |
initial_delay_seconds = number | |
period_seconds = number | |
})) | |
default = [] | |
} | |
variable "annotations" { | |
description = "Annotations for the Cloud Run service" | |
type = map(string) | |
default = {} | |
} | |
variable "volumes" { | |
description = "Volumes for the container" | |
type = list(object({ | |
name = string | |
mount_path = string | |
source = string | |
})) | |
default = [] | |
} | |
variable "command" { | |
description = "Command to run in the container" | |
type = list(string) | |
default = [] | |
} | |
variable "args" { | |
description = "Arguments to pass to the command" | |
type = list(string) | |
default = [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment