test network
This commit is contained in:
28
terraform/environments/dev/main.tf
Normal file
28
terraform/environments/dev/main.tf
Normal file
@@ -0,0 +1,28 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
google = {
|
||||
source = "hashicorp/google"
|
||||
version = "~> 6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "google" {
|
||||
project = var.project_id
|
||||
region = var.region
|
||||
}
|
||||
|
||||
module "network" {
|
||||
source = "../../modules/network"
|
||||
|
||||
# Variables d'entrée
|
||||
project_name = var.project_name
|
||||
region = var.region
|
||||
|
||||
# Autres variables spécifiques au module
|
||||
cidr_range = var.cidr_range
|
||||
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
47
terraform/environments/dev/variables.tf
Normal file
47
terraform/environments/dev/variables.tf
Normal file
@@ -0,0 +1,47 @@
|
||||
# - project_name (string)
|
||||
variable "project_name" {
|
||||
description = "nom du projet"
|
||||
type = string
|
||||
default = "TP_IUT"
|
||||
}
|
||||
|
||||
# - region (string)
|
||||
variable "region" {
|
||||
description = "region du projet"
|
||||
type = string
|
||||
default = "europe-west1-d"
|
||||
}
|
||||
|
||||
# - frontend_cidr (string)
|
||||
variable "frontend_cidr" {
|
||||
description = "cidr du frontend"
|
||||
type = string
|
||||
default = "10.0.1.0/24"
|
||||
}
|
||||
|
||||
# - backend_cidr (string)
|
||||
variable "backend_cidr" {
|
||||
description = "cidr du backend"
|
||||
type = string
|
||||
default = "10.0.2.0/24"
|
||||
}
|
||||
|
||||
# - database_cidr (string)
|
||||
variable "database_cidr" {
|
||||
description = "cidr de la database"
|
||||
type = string
|
||||
default = "10.0.3.0/24"
|
||||
}
|
||||
|
||||
# - ssh_source_ranges (string)
|
||||
variable "ssh_source_ranges" {
|
||||
description = "acces internet"
|
||||
type = string
|
||||
default = "0.0.0.0/0"
|
||||
}
|
||||
|
||||
variable "cidr_range" {
|
||||
description = "cidr de network"
|
||||
type = string
|
||||
default = "10.0.0.0/16"
|
||||
}
|
Reference in New Issue
Block a user