forked from pierront/but3-iac
modif de DEV
This commit is contained in:
@@ -10,12 +10,8 @@ terraform {
|
|||||||
provider "google" {
|
provider "google" {
|
||||||
project = var.projet_name
|
project = var.projet_name
|
||||||
region = var.region
|
region = var.region
|
||||||
zone = var.zone
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# MODULE NETWORK
|
|
||||||
# -------------------------
|
|
||||||
module "network" {
|
module "network" {
|
||||||
source = "../../modules/network"
|
source = "../../modules/network"
|
||||||
|
|
||||||
@@ -23,14 +19,11 @@ module "network" {
|
|||||||
region = var.region
|
region = var.region
|
||||||
}
|
}
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# MODULE COMPUTE
|
|
||||||
# -------------------------
|
|
||||||
module "compute" {
|
module "compute" {
|
||||||
source = "../../modules/compute"
|
source = "../../modules/compute"
|
||||||
|
|
||||||
projet_name = var.projet_name
|
projet_name = var.projet_name
|
||||||
zone = var.zone
|
zone = "europe-west9-a"
|
||||||
instance_type = var.instance_type
|
instance_type = var.instance_type
|
||||||
os_login = var.os_login
|
os_login = var.os_login
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,17 @@ variable "region" {
|
|||||||
default = "europe-west9"
|
default = "europe-west9"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "zone" {
|
|
||||||
type = string
|
|
||||||
default = "europe-west9-b"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "ssh_source_ranges" {
|
variable "ssh_source_ranges" {
|
||||||
type = list(string)
|
type = list(string)
|
||||||
default = ["0.0.0.0/0"]
|
default = ["0.0.0.0/0"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "instance_type" {
|
||||||
|
type = string
|
||||||
|
default = "e2-small"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "os_login" {
|
||||||
|
type = bool
|
||||||
|
default = true
|
||||||
|
}
|
||||||
@@ -1,11 +1,15 @@
|
|||||||
|
output "frontend_subnet_id" {
|
||||||
|
value = google_compute_subnetwork.frontend.id
|
||||||
|
}
|
||||||
|
|
||||||
|
output "backend_subnet_id" {
|
||||||
|
value = google_compute_subnetwork.backend.id
|
||||||
|
}
|
||||||
|
|
||||||
|
output "database_subnet_id" {
|
||||||
|
value = google_compute_subnetwork.database.id
|
||||||
|
}
|
||||||
|
|
||||||
output "vpc_id" {
|
output "vpc_id" {
|
||||||
value = google_compute_network.vpc.id
|
value = google_compute_network.vpc.id
|
||||||
}
|
}
|
||||||
|
|
||||||
output "subnet_ids" {
|
|
||||||
value = {
|
|
||||||
frontend = google_compute_subnetwork.frontend.id
|
|
||||||
backend = google_compute_subnetwork.backend.id
|
|
||||||
database = google_compute_subnetwork.database.id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user