diff --git a/terraform/modules/compute/main.tf b/terraform/modules/compute/main.tf index a828568..ad02eb3 100644 --- a/terraform/modules/compute/main.tf +++ b/terraform/modules/compute/main.tf @@ -14,7 +14,7 @@ resource "google_compute_instance" "frontend" { } network_interface { - network = var.network + network = var.network_id subnetwork = var.frontend_subnet_id access_config {} } @@ -48,7 +48,7 @@ resource "google_compute_instance" "backend" { } network_interface { - network = var.network + network = var.network_id subnetwork = var.backend_subnet_id } @@ -81,7 +81,7 @@ resource "google_compute_instance" "database" { } network_interface { - network = var.network + network = var.network_id subnetwork = var.database_subnet_id } diff --git a/terraform/modules/compute/variables.tf b/terraform/modules/compute/variables.tf index 4e32df0..f200d93 100644 --- a/terraform/modules/compute/variables.tf +++ b/terraform/modules/compute/variables.tf @@ -19,9 +19,9 @@ variable "instance_type" { default = "e2-medium" } -variable "network" { +variable "network_id" { type = string - description = "VPC network self_link or name" + description = "VPC network ID" } variable "frontend_subnet_id" {