53 lines
1.4 KiB
HCL

# GCPプロジェクトIDとリージョン、環境名、ジョブ名の変数定義
variable "project_id" {
description = "The ID of the GCP project to deploy resources into."
type = string
}
variable "region" {
description = "The GCP region to deploy resources into."
type = string
default = "asia-northeast1" # 東京
}
variable "env_name" {
description = "The environment name for the deployment."
type = string
default = "dev"
validation {
condition = contains(["dev", "staging", "prd"], var.env_name)
error_message = "env_name must be one of: dev, staging, prd."
}
}
variable "job_name" {
description = "The name of the Cloud Run Job."
type = string
default = "get-news-ai"
}
# コンテナイメージの変数定義(CI/CDから渡される想定)
variable "container_image" {
description = "The container image for the Cloud Run Job."
type = string
}
# Cloud Run Jobの設定変数
variable "cpu_limit" {
description = "The CPU limit for the Cloud Run Job container."
type = string
default = "1"
}
variable "memory_limit" {
description = "The memory limit for the Cloud Run Job container."
type = string
default = "512Mi"
}
variable "timeout_seconds" {
description = "The timeout for the Cloud Run Job."
type = number
default = 300
}