forked from pierront/but3-iac
arborenscence + fichier modifier
This commit is contained in:
24
terraform/environments/dev/main.tf
Normal file
24
terraform/environments/dev/main.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
|
||||
}
|
||||
0
terraform/environments/dev/outputs.tf
Normal file
0
terraform/environments/dev/outputs.tf
Normal file
43
terraform/environments/dev/variables.tf
Normal file
43
terraform/environments/dev/variables.tf
Normal file
@@ -0,0 +1,43 @@
|
||||
# Commentaire
|
||||
variable "project_name" {
|
||||
type = string
|
||||
description = "but3-iac"
|
||||
default = "Projet-virtualisation"
|
||||
}
|
||||
|
||||
variable "region" {
|
||||
type = string
|
||||
description = "Région dans laquelle déployer les ressources"
|
||||
default = "europe-west9-b"
|
||||
}
|
||||
|
||||
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 = "projet-virtualisation-478713"
|
||||
}
|
||||
Reference in New Issue
Block a user