update dev&compute
This commit is contained in:
parent
41da5c5607
commit
07fccbcd19
@ -22,6 +22,14 @@ module "network"{
|
|||||||
backend_cidr = var.backend_cidr
|
backend_cidr = var.backend_cidr
|
||||||
database_cidr = var.database_cidr
|
database_cidr = var.database_cidr
|
||||||
ssh_source_ranges = var.ssh_source_ranges
|
ssh_source_ranges = var.ssh_source_ranges
|
||||||
|
}
|
||||||
|
|
||||||
|
module "computes"{
|
||||||
|
source = "../../modules/compute"
|
||||||
|
|
||||||
|
tp07-frontend = var.tp07-frontend
|
||||||
|
tp07-backend = var.tp07-backend
|
||||||
|
tp07-database = var.tp07-database
|
||||||
|
zone = var.zone
|
||||||
|
instance_type = var.instance_type
|
||||||
}
|
}
|
@ -39,3 +39,33 @@ variable "ssh_source_ranges"{
|
|||||||
type = string
|
type = string
|
||||||
default = "0.0.0.0/0"
|
default = "0.0.0.0/0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "tp07-frontend"{
|
||||||
|
description = "sous réseau frontend"
|
||||||
|
type = string
|
||||||
|
default = "tp07-frontend"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "tp07-backend"{
|
||||||
|
description = "sous réseau backend"
|
||||||
|
type = string
|
||||||
|
default = "tp07-backend"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "tp07-database"{
|
||||||
|
description = "sous réseau database"
|
||||||
|
type = string
|
||||||
|
default = "tp07-database"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "zone"{
|
||||||
|
description = "region du projet"
|
||||||
|
type = string
|
||||||
|
default = "europe-west4-b"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "instance_type"{
|
||||||
|
description = "type d'instance"
|
||||||
|
type = string
|
||||||
|
default = "e2-small"
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
resource "google_compute_instance" "tp07-frontend" {
|
resource "google_compute_instance" "tp07-frontend" {
|
||||||
name = "tp07-frontend"
|
name = "tp07-frontend"
|
||||||
machine_type = "e2-small"
|
machine_type = var.instance_type
|
||||||
zone = var.region
|
zone = var.region
|
||||||
|
|
||||||
boot_disk {
|
boot_disk {
|
||||||
|
@ -13,7 +13,12 @@ variable "tp07-database"{
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "region"{
|
variable "zone"{
|
||||||
description = "region du projet"
|
description = "region du projet"
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "instance_type"{
|
||||||
|
description = "type d'instance"
|
||||||
|
type = string
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user