62 lines
1.7 KiB
HCL
62 lines
1.7 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 "component_name" {
|
|
description = "The name of the Cloud Function."
|
|
type = string
|
|
}
|
|
|
|
# Cloud Functino の設定変数
|
|
variable "runtime" {
|
|
description = "The runtime environment for the Cloud Function."
|
|
type = string
|
|
default = "python312"
|
|
}
|
|
|
|
variable "entry_point" {
|
|
description = "The entry point function for the Cloud Function."
|
|
type = string
|
|
default = "main"
|
|
}
|
|
|
|
variable "max_instance_count" {
|
|
description = "The maximum number of instances for the Cloud Function."
|
|
type = number
|
|
default = 3
|
|
}
|
|
|
|
variable "min_instance_count" {
|
|
description = "The minimum number of instances for the Cloud Function."
|
|
type = number
|
|
default = 0
|
|
}
|
|
|
|
variable "timeout_seconds" {
|
|
description = "The timeout duration for the Cloud Function in seconds."
|
|
type = number
|
|
default = 60
|
|
}
|
|
|
|
variable "available_memory" {
|
|
description = "The amount of memory available to the Cloud Function."
|
|
type = string
|
|
default = "256M"
|
|
} |