2025-12-03 16:39:42 +01:00
|
|
|
# définissez toutes les variables nécessaires avec des valeurs par défaut appropriées.
|
2025-12-03 15:50:34 +01:00
|
|
|
|
2025-12-03 16:39:42 +01:00
|
|
|
variable "project_name" {
|
|
|
|
|
description = "Nom du projet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "My First Project"
|
2025-12-03 15:50:34 +01:00
|
|
|
}
|
2025-12-03 16:06:54 +01:00
|
|
|
|
2025-12-03 16:39:42 +01:00
|
|
|
variable "region" {
|
|
|
|
|
description = "Region du projet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "europe-west9"
|
2025-12-03 16:06:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "frontend_cidr" {
|
2025-12-03 16:39:42 +01:00
|
|
|
description = "CIDR for frontend subnet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "10.0.1.0/24"
|
2025-12-03 16:06:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "backend_cidr" {
|
2025-12-03 16:39:42 +01:00
|
|
|
description = "CIDR for backend subnet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "10.0.2.0/24"
|
2025-12-03 16:06:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "database_cidr" {
|
2025-12-03 16:39:42 +01:00
|
|
|
description = "CIDR for database subnet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "10.0.3.0/24"
|
2025-12-03 16:06:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "ssh_source_ranges" {
|
2025-12-03 16:39:42 +01:00
|
|
|
description = ""
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-03 16:39:42 +01:00
|
|
|
default = "0.0.0.0/0"
|
2025-12-03 16:06:54 +01:00
|
|
|
}
|
|
|
|
|
|
2025-12-03 16:39:42 +01:00
|
|
|
variable "project_id" {
|
|
|
|
|
description = "ID du projet"
|
2025-12-03 16:06:54 +01:00
|
|
|
type = string
|
2025-12-04 09:38:49 +01:00
|
|
|
default = "learned-trilogy-478713-j7"
|
2025-12-04 09:10:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "instance_type" {
|
|
|
|
|
description = "type de l'instance"
|
|
|
|
|
type = string
|
2025-12-04 09:57:10 +01:00
|
|
|
default = "e2-small"
|
2025-12-04 09:10:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
|
description = "Nom de la zone"
|
|
|
|
|
type = string
|
|
|
|
|
default = "europe-west9-b"
|
2025-12-04 11:05:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "ssh_public_key_path" {
|
|
|
|
|
type = string
|
|
|
|
|
description = "Chemin vers la clé publique SSH"
|
|
|
|
|
default = "~/.ssh/id_ed25519.pub"
|
|
|
|
|
}
|