forked from pierront/but3-iac
38 lines
761 B
Terraform
38 lines
761 B
Terraform
|
|
terraform {
|
||
|
|
required_providers {
|
||
|
|
google = {
|
||
|
|
source = "hashicorp/google"
|
||
|
|
version = "~> 6.12.0"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
provider "google" {
|
||
|
|
project = var.projet_name
|
||
|
|
region = var.region
|
||
|
|
}
|
||
|
|
|
||
|
|
module "network" {
|
||
|
|
source = "../../modules/network"
|
||
|
|
|
||
|
|
projet_name = var.projet_name
|
||
|
|
region = var.region
|
||
|
|
}
|
||
|
|
|
||
|
|
module "compute" {
|
||
|
|
source = "../../modules/compute"
|
||
|
|
|
||
|
|
projet_name = var.projet_name
|
||
|
|
zone = "europe-west9-b"
|
||
|
|
instance_type = var.instance_type
|
||
|
|
os_login = var.os_login
|
||
|
|
|
||
|
|
frontend_subnet_id = module.network.frontend_subnet_id
|
||
|
|
backend_subnet_id = module.network.backend_subnet_id
|
||
|
|
database_subnet_id = module.network.database_subnet_id
|
||
|
|
}
|
||
|
|
|
||
|
|
module "iam" {
|
||
|
|
source = "../../modules/iam"
|
||
|
|
projet_name = var.projet_name
|
||
|
|
}
|