forked from pierront/but3-iac
correction ?
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
resource "google_compute_instance" "frontend_vm" {
|
||||
name = "frontend-vm"
|
||||
machine_type = "e2-medium"
|
||||
zone = "europe-west1-b"
|
||||
machine_type = var.instance_type
|
||||
zone = var.zone
|
||||
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
@@ -14,8 +14,9 @@ resource "google_compute_instance" "frontend_vm" {
|
||||
}
|
||||
|
||||
network_interface {
|
||||
subnetwork = var.frontend_subnet_id
|
||||
|
||||
access_config {} # IP publique
|
||||
subnetwork = google_compute_network.vpc.id
|
||||
}
|
||||
|
||||
tags = ["frontend", "ssh"]
|
||||
@@ -29,8 +30,8 @@ resource "google_compute_instance" "frontend_vm" {
|
||||
|
||||
resource "google_compute_instance" "backend_vm" {
|
||||
name = "backend-vm"
|
||||
machine_type = "e2-medium"
|
||||
zone = "europe-west1-b"
|
||||
machine_type = var.instance_type
|
||||
zone = var.zone
|
||||
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
@@ -40,8 +41,7 @@ resource "google_compute_instance" "backend_vm" {
|
||||
}
|
||||
|
||||
network_interface {
|
||||
|
||||
subnetwork = google_compute_network.vpc.id
|
||||
subnetwork = var.backend_subnet_id
|
||||
}
|
||||
|
||||
tags = ["backend", "ssh"]
|
||||
@@ -56,8 +56,8 @@ resource "google_compute_instance" "backend_vm" {
|
||||
|
||||
resource "google_compute_instance" "database_vm" {
|
||||
name = "database-vm"
|
||||
machine_type = "e2-medium"
|
||||
zone = "europe-west1-b"
|
||||
machine_type = var.instance_type
|
||||
zone = var.zone
|
||||
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
@@ -67,8 +67,7 @@ resource "google_compute_instance" "database_vm" {
|
||||
}
|
||||
|
||||
network_interface {
|
||||
|
||||
subnetwork = google_compute_network.vpc.id
|
||||
subnetwork = var.database_subnet_id
|
||||
}
|
||||
|
||||
tags = ["database", "ssh"]
|
||||
@@ -76,5 +75,4 @@ resource "google_compute_instance" "database_vm" {
|
||||
metadata = {
|
||||
enable-oslogin = "TRUE"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user