This commit is contained in:
2024-12-04 16:11:43 +01:00
parent dea0329bb1
commit 419e7e6fd0
3 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 6.0"
}
}
}
provider "google" {
project = var.project_id
region = var.region
}
module "network" {
source = "../../modules/network"
project_name = var.project_name
region = var.region
cidr_range = var.cidr_range
backend_cidr = var.backend_cidr
frontend_cidr = var.frontend_cidr
database_cidr = var.database_cidr
ssh_source_ranges = var.ssh_source_ranges
}

View File

@@ -0,0 +1,42 @@
variable "project_name" {
description = "ID du projet GCP"
type = string
default = "iut fbleau tp"
}
variable "region" {
description = "region du projet"
type = string
default = "europe-west9-c"
}
variable "frontend_cidr" {
description = "frontend"
type = string
default = "10.0.1.0/24"
}
variable "backend_cidr" {
description = "backend"
type = string
default = "10.0.2.0/24"
}
variable "database_cidr" {
description = "database"
type = string
default = "10.0.3.0/24"
}
variable "ssh_source_ranges" {
description = "acces par ssh"
type = string
default = "0.0.0.0/0"
}
variable "cidr_range" {
description = "cidr-network"
type = string
default = "10.0.0.0/16"
}