54 lines
1.5 KiB
HCL
54 lines
1.5 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 "hash_suffix" {
|
|
description = "The container image for the Cloud Run Job."
|
|
type = string
|
|
default = null
|
|
}
|
|
|
|
|
|
# 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" {
|
|
description = "The task timeout in seconds for the Cloud Run Job."
|
|
type = string
|
|
default = "1800s"
|
|
} |