diff --git a/main.tf b/main.tf index c6f4d1b..184a993 100644 --- a/main.tf +++ b/main.tf @@ -2,22 +2,11 @@ terraform { required_version = ">= 0.14.0" } -variable "project_id" { - description = "The ID of the GCP project." -} - -variable "region" { - description = "The region to create resources in." - default = "us-central1" -} - -provider "google" { - project = var.project_id - region = var.region -} - module "network" { - source = "./modules/network" + source = "./modules/network" + project_id = var.project_id + region = var.region + network_cidr= var.network_cidr } module "backend" { diff --git a/network.tf b/network.tf index 932994b..4e79b7f 100644 --- a/network.tf +++ b/network.tf @@ -1,10 +1,3 @@ -module "network" { - source = "./modules/network" - project_id = var.project_id - region = var.region - network_cidr= var.network_cidr -} - resource "google_compute_instance" "backend" { name = "backend" machine_type = "n1-standard-1"