This commit is contained in:
gastonchenet
2025-12-04 10:05:03 +01:00
parent 0b8021651f
commit efad4d1a16
2 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ resource "google_compute_instance" "frontend" {
} }
network_interface { network_interface {
network = var.network network = var.network_id
subnetwork = var.frontend_subnet_id subnetwork = var.frontend_subnet_id
access_config {} access_config {}
} }
@@ -48,7 +48,7 @@ resource "google_compute_instance" "backend" {
} }
network_interface { network_interface {
network = var.network network = var.network_id
subnetwork = var.backend_subnet_id subnetwork = var.backend_subnet_id
} }
@@ -81,7 +81,7 @@ resource "google_compute_instance" "database" {
} }
network_interface { network_interface {
network = var.network network = var.network_id
subnetwork = var.database_subnet_id subnetwork = var.database_subnet_id
} }

View File

@@ -19,9 +19,9 @@ variable "instance_type" {
default = "e2-medium" default = "e2-medium"
} }
variable "network" { variable "network_id" {
type = string type = string
description = "VPC network self_link or name" description = "VPC network ID"
} }
variable "frontend_subnet_id" { variable "frontend_subnet_id" {