Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 818299afef | |||
| 3f804d21c2 | |||
| 857a7f0e8d | |||
| ac6770b6c6 | |||
| 1b306a4ede | |||
| be5dec853b | |||
| a280f67196 | |||
| 4530087cd1 | |||
| 68790cf2d1 | |||
| b2e56cbc88 | |||
| aa28319166 | |||
| bd69138c68 | |||
| b18e0ec5a2 | |||
| 1f344183f8 | |||
| e3ff9de93e | |||
| ea215256e1 | |||
| df9d025406 | |||
| 2bc66b21b3 | |||
| 1a83d45b66 | |||
| 242459b5b5 | |||
| 42dd3fb11c | |||
| c4e88b89e3 | |||
| b74e128a5e |
90
iam-step.md
Normal file
90
iam-step.md
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
# TP : Gestion des Identités (IAM) et Accès SSH
|
||||||
|
|
||||||
|
Dans cette partie, vous allez configurer les accès pour que Terraform puisse interagir avec le projet et pour que vous puissiez vous connecter aux futures machines virtuelles.
|
||||||
|
|
||||||
|
## Objectifs
|
||||||
|
1. Créer une identité machine (Service Account).
|
||||||
|
2. Lui donner des droits sur le projet.
|
||||||
|
3. Configurer votre propre clé SSH via le service **OS Login** de GCP.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Étape 1 : Créer l'identité machine
|
||||||
|
**Objectif :** Créer un compte de service (Service Account) qui sera utilisé par nos scripts d'automatisation.
|
||||||
|
|
||||||
|
* **Ressource à utiliser :** `google_service_account`
|
||||||
|
* **Consignes :**
|
||||||
|
* Donnez-lui l'ID `terraform`.
|
||||||
|
* Ajoutez un `display_name` explicite pour qu'on le reconnaisse dans la console GCP.
|
||||||
|
|
||||||
|
## Étape 2 : Générer une clé d'accès
|
||||||
|
**Objectif :** Pour utiliser ce compte de service depuis l'extérieur (ou via Terraform), nous avons besoin d'une clé.
|
||||||
|
|
||||||
|
* **Ressource à utiliser :** `google_service_account_key`
|
||||||
|
* **Consignes :**
|
||||||
|
* Vous devez lier cette ressource au compte de service créé à l'étape 1 via son attribut `name` (ex: `google_service_account.votre_nom.name`).
|
||||||
|
* Définissez le type de clé publique sur `"TYPE_X509_PEM_FILE"`.
|
||||||
|
|
||||||
|
## Étape 3 : Donner des droits (IAM)
|
||||||
|
**Objectif :** Un compte de service naît sans aucun droit. Vous devez lui donner le rôle de "Viewer" sur le projet pour qu'il puisse lire les ressources.
|
||||||
|
|
||||||
|
* **Ressource à utiliser :** `google_project_iam_binding`
|
||||||
|
* **Consignes :**
|
||||||
|
* **Project :** Utilisez votre variable `var.project_id`.
|
||||||
|
* **Role :** Le rôle cible est `"roles/viewer"`.
|
||||||
|
* **Members :** C'est une liste. Attention à la syntaxe spécifique GCP pour désigner un membre : `"serviceAccount:..."`. Vous devez concaténer ce préfixe avec l'email du service account créé à l'étape 1 (`.email`).
|
||||||
|
|
||||||
|
## Étape 4 : Récupérer votre identité
|
||||||
|
**Objectif :** Terraform doit savoir "qui" lance le script actuellement pour associer la clé SSH à la bonne personne.
|
||||||
|
|
||||||
|
* **Data Source à utiliser :** `data "google_client_openid_userinfo"`
|
||||||
|
* **Consignes :**
|
||||||
|
* Déclarez simplement ce bloc `data` avec le nom `me`. Il n'a pas besoin d'arguments à l'intérieur. Il servira juste à récupérer votre email dynamiquement.
|
||||||
|
|
||||||
|
## Étape 5 : Ajouter votre clé SSH (OS Login)
|
||||||
|
**Objectif :** Uploader votre clé publique SSH locale vers GCP pour permettre la connexion aux VMs sans gestion manuelle.
|
||||||
|
|
||||||
|
* **Ressource à utiliser :** `google_os_login_ssh_public_key`
|
||||||
|
* **Consignes :**
|
||||||
|
* **User :** Utilisez l'email récupéré grâce au data source de l'étape 4 (`.email`).
|
||||||
|
* **Key :** Vous devez lire le contenu de votre fichier de clé publique locale.
|
||||||
|
* **Fonction Terraform :** Utilisez la fonction `file("chemin/vers/la/clé")`.
|
||||||
|
* **Chemin recommandé :** `~/.ssh/id_ed25519.pub`.
|
||||||
|
|
||||||
|
> **Attention :** Vérifiez impérativement que vous avez bien généré une clé SSH sur votre poste local avant de lancer le `terraform apply`. Sinon, Terraform ne trouvera pas le fichier et plantera.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Résumé des liens entre ressources
|
||||||
|
Assurez-vous que vos ressources se référencent correctement :
|
||||||
|
* La **Clé** référencie le **Service Account**.
|
||||||
|
* L'**IAM Binding** référencie le **Service Account**.
|
||||||
|
* L'**OS Login** référencie le **Data User Info**.
|
||||||
|
|
||||||
|
Voici la suite du document Markdown (MD) à ajouter à la suite de l'étape 5.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Étape 6 : Exposer les résultats (Outputs)
|
||||||
|
|
||||||
|
**Objectif :** Une fois le déploiement terminé, Terraform masque par défaut certaines informations. Nous devons définir explicitement quelles valeurs nous voulons voir ou récupérer (notamment pour les utiliser dans d'autres scripts).
|
||||||
|
|
||||||
|
* **Fichier à utiliser :** `outputs.tf` (c'est une bonne pratique de séparer les outputs du `main.tf`).
|
||||||
|
|
||||||
|
### Consigne A : L'email du Service Account
|
||||||
|
|
||||||
|
Nous aurons besoin de connaître l'adresse email complète générée par Google pour ce compte.
|
||||||
|
|
||||||
|
* Créez un output nommé `service_account_email`.
|
||||||
|
* Dans la valeur (`value`), référencez l'attribut `.email` de la ressource créée à l'**Étape 1**.
|
||||||
|
|
||||||
|
### Consigne B : La Clé Privée (Attention Sécurité)
|
||||||
|
|
||||||
|
Nous devons récupérer la clé privée générée pour pouvoir authentifier des applications externes.
|
||||||
|
|
||||||
|
* Créez un output nommé `service_account_key`.
|
||||||
|
* Dans la valeur, référencez l'attribut `.private_key` de la ressource créée à l'**Étape 2**.
|
||||||
|
* **Important :** Terraform refusera d'afficher cette valeur ou l'affichera en clair dans vos logs si vous ne faites pas attention. Vous **devez** ajouter l'argument suivant dans ce bloc output pour masquer la valeur dans le terminal :
|
||||||
|
```hcl
|
||||||
|
sensitive = true
|
||||||
|
```
|
||||||
582
terraform-show.txt
Normal file
582
terraform-show.txt
Normal file
File diff suppressed because one or more lines are too long
40
terraform/environments/dev/main.tf
Normal file
40
terraform/environments/dev/main.tf
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Commentaire
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
google = {
|
||||||
|
source = "hashicorp/google"
|
||||||
|
version = "~> 6.12.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "google" {
|
||||||
|
project = var.project_id
|
||||||
|
region = var.region
|
||||||
|
}
|
||||||
|
|
||||||
|
module "network" {
|
||||||
|
source = "../../modules/network"
|
||||||
|
project_name = var.project_name
|
||||||
|
region = var.region
|
||||||
|
frontend_cidr = var.frontend_cidr
|
||||||
|
backend_cidr = var.backend_cidr
|
||||||
|
database_cidr = var.database_cidr
|
||||||
|
ssh_source_ranges = var.ssh_source_ranges
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module "compute" {
|
||||||
|
source = "../../modules/compute"
|
||||||
|
instance_type = var.instance_type
|
||||||
|
zone = var.zone
|
||||||
|
frontend_subnet_id = module.network.subnet_ids.frontend
|
||||||
|
backend_subnet_id = module.network.subnet_ids.backend
|
||||||
|
database_subnet_id = module.network.subnet_ids.database
|
||||||
|
}
|
||||||
|
|
||||||
|
module "iam" {
|
||||||
|
source = "../../modules/iam"
|
||||||
|
project_id = var.project_id
|
||||||
|
}
|
||||||
31
terraform/environments/dev/outputs.tf
Normal file
31
terraform/environments/dev/outputs.tf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
output "ip_internes" {
|
||||||
|
value = module.compute.ip_internes
|
||||||
|
}
|
||||||
|
|
||||||
|
output "ip_public_frontend" {
|
||||||
|
value = module.compute.ip_public_frontend
|
||||||
|
}
|
||||||
|
|
||||||
|
output "nom_instances" {
|
||||||
|
value = module.compute.nom_instances
|
||||||
|
}
|
||||||
|
output "service_account_email"{
|
||||||
|
value = module.iam.service_account_email
|
||||||
|
}
|
||||||
|
|
||||||
|
output "service_account_key"{
|
||||||
|
sensitive = true
|
||||||
|
value = module.iam.service_account_key
|
||||||
|
}
|
||||||
|
output "vpc_terraform" {
|
||||||
|
|
||||||
|
value = module.network.vpc_terraform
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
output "subnet_ids" {
|
||||||
|
|
||||||
|
value = module.network.subnet_ids
|
||||||
|
|
||||||
|
}
|
||||||
63
terraform/environments/dev/variables.tf
Normal file
63
terraform/environments/dev/variables.tf
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Commentaire
|
||||||
|
variable "project_name" {
|
||||||
|
type = string
|
||||||
|
description = "but3-iac"
|
||||||
|
default = "Automaticsearch"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "region" {
|
||||||
|
type = string
|
||||||
|
description = "Région dans laquelle déployer les ressources"
|
||||||
|
default = "europe-west9"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "frontend_cidr" {
|
||||||
|
description = "CIDR for frontend subnet"
|
||||||
|
type = string
|
||||||
|
default = "10.0.1.0/24"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "backend_cidr" {
|
||||||
|
description = "CIDR for backend subnet"
|
||||||
|
type = string
|
||||||
|
default = "10.0.2.0/24"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "database_cidr" {
|
||||||
|
description = "CIDR for database subnet"
|
||||||
|
type = string
|
||||||
|
default = "10.0.3.0/24"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "ssh_source_ranges" {
|
||||||
|
type = string
|
||||||
|
description = "Plages d’adresses autorisées à se connecter en SSH"
|
||||||
|
default = "0.0.0.0/0"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
variable "project_id"{
|
||||||
|
description = "id du projet"
|
||||||
|
type = string
|
||||||
|
default = "automaticsearch-477610"
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "instance_type" {
|
||||||
|
description = "Type de machine à utiliser pour les instances"
|
||||||
|
type = string
|
||||||
|
default = "e2-small"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "zone" {
|
||||||
|
description = "Zone où déployer les instances"
|
||||||
|
type = string
|
||||||
|
default = "europe-west9-b"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
76
terraform/modules/compute/main.tf
Normal file
76
terraform/modules/compute/main.tf
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
resource "google_compute_instance" "vm_frontend" {
|
||||||
|
name = "frontend-instance"
|
||||||
|
machine_type = var.instance_type
|
||||||
|
zone = var.zone
|
||||||
|
|
||||||
|
boot_disk {
|
||||||
|
initialize_params {
|
||||||
|
image = "debian-cloud/debian-11"
|
||||||
|
size = 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
network_interface {
|
||||||
|
subnetwork = var.frontend_subnet_id
|
||||||
|
|
||||||
|
access_config {}
|
||||||
|
}
|
||||||
|
|
||||||
|
tags= ["frontend", "ssh"]
|
||||||
|
|
||||||
|
metadata = {
|
||||||
|
enable-oslogin = "TRUE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_instance" "vm_backend" {
|
||||||
|
name = "backend-instance"
|
||||||
|
machine_type = var.instance_type
|
||||||
|
zone = var.zone
|
||||||
|
|
||||||
|
boot_disk {
|
||||||
|
initialize_params {
|
||||||
|
image = "debian-cloud/debian-11"
|
||||||
|
size = 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
network_interface {
|
||||||
|
subnetwork = var.backend_subnet_id
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tags = ["backend", "ssh"]
|
||||||
|
|
||||||
|
metadata = {
|
||||||
|
enable-oslogin = "TRUE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_instance" "vm_database" {
|
||||||
|
name = "database-instance"
|
||||||
|
machine_type = var.instance_type
|
||||||
|
zone = var.zone
|
||||||
|
|
||||||
|
|
||||||
|
boot_disk {
|
||||||
|
initialize_params {
|
||||||
|
image = "debian-cloud/debian-11"
|
||||||
|
size = 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
network_interface {
|
||||||
|
subnetwork = var.database_subnet_id
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tags = ["database", "ssh"]
|
||||||
|
|
||||||
|
metadata = {
|
||||||
|
enable-oslogin = "TRUE"
|
||||||
|
}
|
||||||
|
}
|
||||||
19
terraform/modules/compute/outputs.tf
Normal file
19
terraform/modules/compute/outputs.tf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
output "ip_internes" {
|
||||||
|
value = {
|
||||||
|
frontend = google_compute_instance.vm_frontend.network_interface[0].network_ip
|
||||||
|
backend = google_compute_instance.vm_backend.network_interface[0].network_ip
|
||||||
|
database = google_compute_instance.vm_database.network_interface[0].network_ip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output "ip_public_frontend" {
|
||||||
|
value = google_compute_instance.vm_frontend.network_interface[0].access_config[0].nat_ip
|
||||||
|
}
|
||||||
|
|
||||||
|
output "nom_instances" {
|
||||||
|
value = {
|
||||||
|
frontend = google_compute_instance.vm_frontend.name
|
||||||
|
backend = google_compute_instance.vm_backend.name
|
||||||
|
database = google_compute_instance.vm_database.name
|
||||||
|
}
|
||||||
|
}
|
||||||
27
terraform/modules/compute/variables.tf
Normal file
27
terraform/modules/compute/variables.tf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
variable "instance_type" {
|
||||||
|
description = "Type de machine à utiliser pour les instances"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "zone" {
|
||||||
|
description = "Zone où déployer les instances"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "frontend_subnet_id" {
|
||||||
|
description = "ID du sous-réseau frontend"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "backend_subnet_id" {
|
||||||
|
description = "ID du sous-réseau backend"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "database_subnet_id" {
|
||||||
|
description = "ID du sous-réseau database"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
32
terraform/modules/iam/main.tf
Normal file
32
terraform/modules/iam/main.tf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
resource "google_service_account" "myaccount" {
|
||||||
|
account_id = "terraform"
|
||||||
|
display_name = "terraform"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_service_account_key" "mykey" {
|
||||||
|
service_account_id = google_service_account.myaccount.name
|
||||||
|
public_key_type = "TYPE_X509_PEM_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "google_project_iam_binding" "project_iam" {
|
||||||
|
project = var.project_id
|
||||||
|
role = "roles/viewer"
|
||||||
|
|
||||||
|
members = [
|
||||||
|
"serviceAccount:${google_service_account.myaccount.email}",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
data "google_client_openid_userinfo" "me" {
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_os_login_ssh_public_key" "cache" {
|
||||||
|
user = data.google_client_openid_userinfo.me.email
|
||||||
|
project = var.project_id
|
||||||
|
key = file("~/.ssh/id_ed25519.pub")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
10
terraform/modules/iam/outputs.tf
Normal file
10
terraform/modules/iam/outputs.tf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
output "service_account_email"{
|
||||||
|
description = "Service account email"
|
||||||
|
value = google_service_account.myaccount.email
|
||||||
|
}
|
||||||
|
|
||||||
|
output "service_account_key"{
|
||||||
|
description = "Service key"
|
||||||
|
sensitive = true
|
||||||
|
value = google_service_account_key.mykey.private_key
|
||||||
|
}
|
||||||
5
terraform/modules/iam/variables.tf
Normal file
5
terraform/modules/iam/variables.tf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
variable "project_id" {
|
||||||
|
description = "Le projet ID"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
}
|
||||||
87
terraform/modules/network/main.tf
Normal file
87
terraform/modules/network/main.tf
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
resource "google_compute_network" "vpc" {
|
||||||
|
name = "mon-vpc"
|
||||||
|
auto_create_subnetworks = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sous-réseau
|
||||||
|
resource "google_compute_subnetwork" "frontend_network" {
|
||||||
|
name = "mon-frontend"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
ip_cidr_range = var.frontend_cidr
|
||||||
|
region = var.region
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_subnetwork" "backend_network" {
|
||||||
|
name = "mon-backend"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
ip_cidr_range = var.backend_cidr
|
||||||
|
region = var.region
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_subnetwork" "database_network" {
|
||||||
|
name = "mon-database"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
ip_cidr_range = var.database_cidr
|
||||||
|
region = var.region
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_firewall" "ssh_firewall" {
|
||||||
|
name = "mon-ssh"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
allow {
|
||||||
|
protocol = "tcp"
|
||||||
|
ports = ["22"]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_ranges = ["0.0.0.0/0"]
|
||||||
|
target_tags = ["ssh"]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "google_compute_firewall" "frontend_firewall" {
|
||||||
|
name = "frontend"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
allow {
|
||||||
|
protocol = "tcp"
|
||||||
|
ports = ["80", "443"]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_ranges = ["0.0.0.0/0"]
|
||||||
|
target_tags = ["frontend"]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_firewall" "backend_firewall" {
|
||||||
|
name = "backend"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
allow {
|
||||||
|
protocol = "tcp"
|
||||||
|
ports = ["8000"]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_tags = ["frontend"]
|
||||||
|
target_tags = ["backend"]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_firewall" "database_firewall" {
|
||||||
|
name = "database"
|
||||||
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
allow {
|
||||||
|
protocol = "tcp"
|
||||||
|
ports = ["3306"]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_tags = ["backend"]
|
||||||
|
target_tags = ["database"]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
17
terraform/modules/network/outputs.tf
Normal file
17
terraform/modules/network/outputs.tf
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
output "vpc_terraform" {
|
||||||
|
description = "ID du VPC créé"
|
||||||
|
value = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
output "subnet_ids" {
|
||||||
|
description = "Map des IDs des sous-réseaux"
|
||||||
|
value = {
|
||||||
|
|
||||||
|
frontend = google_compute_subnetwork.frontend_network.id
|
||||||
|
backend = google_compute_subnetwork.backend_network.id
|
||||||
|
database = google_compute_subnetwork.database_network.id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
36
terraform/modules/network/variables.tf
Normal file
36
terraform/modules/network/variables.tf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
variable "project_name" {
|
||||||
|
type = string
|
||||||
|
description = "but3-iac"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "region" {
|
||||||
|
type = string
|
||||||
|
description = "Région dans laquelle déployer les ressources"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "frontend_cidr" {
|
||||||
|
description = "CIDR for frontend subnet"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "backend_cidr" {
|
||||||
|
description = "CIDR for backend subnet"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "database_cidr" {
|
||||||
|
description = "CIDR for database subnet"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "ssh_source_ranges" {
|
||||||
|
description = "Plages d’adresses autorisées à se connecter en SSH"
|
||||||
|
type = string
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user