├── .gitignore ├── README.md ├── gcs-bucket ├── main.tf ├── provider.tf └── variables.tf ├── single-and-multi-node-compute-vm ├── README.md ├── backend.tf ├── firewall.tf ├── main.tf ├── network.tf ├── provider.tf └── variables.tf └── test-env ├── README.md ├── test-gcp-instance ├── backend.tf ├── data.tf ├── firewall.tf ├── main.tf ├── state.tf └── variables.tf └── test-vpc ├── backend.tf ├── main.tf ├── provider.tf └── variables.tf /.gitignore: -------------------------------------------------------------------------------- 1 | credentials/* 2 | .DS_Store 3 | example.tf 4 | terraform.tfplan 5 | terraform.tfstate 6 | *.backup 7 | ./*.tfstate 8 | .terraform/ 9 | *.log 10 | *.bak 11 | *~ 12 | .*.swp 13 | .idea 14 | *.iml 15 | *.test 16 | *.iml 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## terraform gcp examples 2 | 3 | ## Modules 4 | 5 | - [GCS bucket](https://github.com/tasdikrahman/terraform-gcp-examples/tree/master/gcs-bucket/) 6 | - [single-node-compute-vm](https://github.com/tasdikrahman/terraform-gcp-examples/tree/master/single-and-multi-node-compute-vm) 7 | - [test-env](https://github.com/tasdikrahman/terraform-gcp-examples/tree/master/test-env/) 8 | 9 | ### Setup 10 | 11 | Don't forget to place the file `account.json` inside the `credentials` dir in the root directory before running which would contain your service Account Key file. 12 | 13 | This contains your authentication required for Terraform to talk to the Google API. 14 | 15 | You can get it under 16 | 17 | `Google Cloud Platform -> API Manager -> Credentials -> Create Credentials -> Service account key.` 18 | 19 | For the Key type field chose JSON. Put the downloaded file right were your Terraform config file is and name it `account.json`. 20 | 21 | If you are using the gcs as the backend, you will need to give it the `Storage Admin` role for the `storage.buckets.create` permission. 22 | 23 | ## LICENSE 24 | 25 | MIT Licensed 26 | -------------------------------------------------------------------------------- /gcs-bucket/main.tf: -------------------------------------------------------------------------------- 1 | resource "google_storage_bucket" "tasdikrahman-terraform-state" { 2 | name = "tasdikrahman-terraform-state" 3 | location = "${var.location}" 4 | force_destroy = true 5 | } 6 | -------------------------------------------------------------------------------- /gcs-bucket/provider.tf: -------------------------------------------------------------------------------- 1 | provider "google" { 2 | credentials = "${file("${path.module}/../credentials/account.json")}" 3 | project = "${var.project-name}" 4 | region = "${var.region}" 5 | } 6 | -------------------------------------------------------------------------------- /gcs-bucket/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | default = "us-central1" # Oregon 3 | } 4 | 5 | variable "project-name" { 6 | default = "gsoc-172407" 7 | } 8 | 9 | variable "location" { 10 | default = "US" 11 | } 12 | 13 | variable "storage-class" { 14 | default = "REGIONAL" 15 | } 16 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/README.md: -------------------------------------------------------------------------------- 1 | ## Single node VM 2 | 3 | This demonstrates the provisioning of a single compute VM(`g1-small`) with centos7 (these can be changed inside the `variables.tf` file) in GCP inside a custom created VPC with firewall rules attached to it. 4 | 5 | You can use the remote backend as `gcs` or any other backends as described in the docs of terraform. If using `gcs` as is the case here. Do a 6 | 7 | ```bash 8 | $ gcloud auth application-default login 9 | ``` 10 | 11 | before running 12 | 13 | ```bash 14 | $ terraform init 15 | ``` 16 | 17 | This will create the `terraform.tfstate` file in the bucket as specified in `backend.tf` 18 | 19 | **NOTE** 20 | 21 | You can create multiple instances of the same type by modifying you `main.tf` like 22 | 23 | ```hcl 24 | ... 25 | ... 26 | name = "${var.instance-name}" 27 | 28 | ## for a setup having multiple instances of the same type, you can do 29 | ## the following, there would be 2 instances of the same configuration 30 | ## provisioned 31 | # count = 2 32 | # name = "${var.instance-name}-${count.index}" 33 | machine_type = "${var.vm_type["1point7gig"]}" 34 | 35 | zone = "${var.region}" 36 | ... 37 | ... 38 | ``` 39 | 40 | ## Running it 41 | 42 | ```bash 43 | $ terraform plan 44 | $ terraform apply 45 | ``` 46 | 47 | ## Appendix 48 | 49 | ```bash 50 | $ gcloud compute machine-types list | grep us-west1-a 51 | f1-micro us-west1-a 1 0.60 52 | g1-small us-west1-a 1 1.70 53 | n1-standard-1 us-west1-a 1 3.75 54 | n1-standard-2 us-west1-a 2 7.50 55 | n1-standard-4 us-west1-a 4 15.00 56 | n1-standard-8 us-west1-a 8 30.00 57 | n1-standard-16 us-west1-a 16 60.00 58 | n1-standard-32 us-west1-a 32 120.00 59 | n1-standard-64 us-west1-a 64 240.00 60 | n1-highcpu-2 us-west1-a 2 1.80 61 | n1-highcpu-4 us-west1-a 4 3.60 62 | n1-highcpu-8 us-west1-a 8 7.20 63 | n1-highcpu-16 us-west1-a 16 14.40 64 | n1-highcpu-32 us-west1-a 32 28.80 65 | n1-highcpu-64 us-west1-a 64 57.60 66 | n1-highmem-2 us-west1-a 2 13.00 67 | n1-highmem-4 us-west1-a 4 26.00 68 | n1-highmem-8 us-west1-a 8 52.00 69 | n1-highmem-16 us-west1-a 16 104.00 70 | n1-highmem-32 us-west1-a 32 208.00 71 | n1-highmem-64 us-west1-a 64 416.00 72 | ``` 73 | 74 | ```bash 75 | $ gcloud compute images list 76 | NAME PROJECT FAMILY DEPRECATED STATUS 77 | centos-6-v20170816 centos-cloud centos-6 READY 78 | centos-7-v20170816 centos-cloud centos-7 READY 79 | coreos-alpha-1506-0-0-v20170817 coreos-cloud coreos-alpha READY 80 | coreos-beta-1492-5-0-v20170817 coreos-cloud coreos-beta READY 81 | coreos-stable-1465-6-0-v20170817 coreos-cloud coreos-stable READY 82 | debian-8-jessie-v20170816 debian-cloud debian-8 READY 83 | debian-9-stretch-v20170816 debian-cloud debian-9 READY 84 | cos-beta-61-9765-31-0 cos-cloud cos-beta READY 85 | cos-dev-62-9851-0-0 cos-cloud cos-dev READY 86 | cos-stable-59-9460-73-0 cos-cloud cos-stable READY 87 | cos-stable-60-9592-84-0 cos-cloud cos-stable READY 88 | rhel-6-v20170816 rhel-cloud rhel-6 READY 89 | rhel-7-v20170816 rhel-cloud rhel-7 READY 90 | sles-11-sp4-v20170621 suse-cloud sles-11 READY 91 | sles-12-sp2-v20170620 suse-cloud sles-12 READY 92 | sles-12-sp1-sap-v20170620 suse-sap-cloud sles-12-sp1-sap READY 93 | sles-12-sp2-sap-v20170620 suse-sap-cloud sles-12-sp2-sap READY 94 | ubuntu-1404-trusty-v20170818 ubuntu-os-cloud ubuntu-1404-lts READY 95 | ubuntu-1604-xenial-v20170815a ubuntu-os-cloud ubuntu-1604-lts READY 96 | ubuntu-1704-zesty-v20170811 ubuntu-os-cloud ubuntu-1704 READY 97 | windows-server-2008-r2-dc-v20170808 windows-cloud windows-2008-r2 READY 98 | windows-server-2012-r2-dc-core-v20170808 windows-cloud windows-2012-r2-core READY 99 | windows-server-2012-r2-dc-v20170808 windows-cloud windows-2012-r2 READY 100 | windows-server-2016-dc-core-v20170808 windows-cloud windows-2016-core READY 101 | windows-server-2016-dc-v20170808 windows-cloud windows-2016 READY 102 | sql-2012-enterprise-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-ent-2012-win-2012-r2 READY 103 | sql-2012-standard-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-std-2012-win-2012-r2 READY 104 | sql-2012-web-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-web-2012-win-2012-r2 READY 105 | sql-2014-enterprise-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-ent-2014-win-2012-r2 READY 106 | sql-2014-enterprise-windows-2016-dc-v20170808 windows-sql-cloud sql-ent-2014-win-2016 READY 107 | sql-2014-standard-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-std-2014-win-2012-r2 READY 108 | sql-2014-web-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-web-2014-win-2012-r2 READY 109 | sql-2016-enterprise-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-ent-2016-win-2012-r2 READY 110 | sql-2016-enterprise-windows-2016-dc-v20170808 windows-sql-cloud sql-ent-2016-win-2016 READY 111 | sql-2016-express-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-exp-2016-win-2012-r2 READY 112 | sql-2016-express-windows-2016-dc-v20170808 windows-sql-cloud sql-exp-2016-win-2016 READY 113 | sql-2016-standard-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-std-2016-win-2012-r2 READY 114 | sql-2016-standard-windows-2016-dc-v20170808 windows-sql-cloud sql-std-2016-win-2016 READY 115 | sql-2016-web-windows-2012-r2-dc-v20170808 windows-sql-cloud sql-web-2016-win-2012-r2 READY 116 | sql-2016-web-windows-2016-dc-v20170808 windows-sql-cloud sql-web-2016-win-2016 READY 117 | ``` -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/backend.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "gcs" { 3 | bucket = "tasdikrahman-terraform-state" 4 | path = "gcp/terraform.tfstate" 5 | project = "gsoc-172407" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/firewall.tf: -------------------------------------------------------------------------------- 1 | resource "google_compute_firewall" "ssh" { 2 | name = "${var.network}-firewall-ssh" 3 | network = "${google_compute_network.ovirt_network.name}" 4 | 5 | allow { 6 | protocol = "tcp" 7 | ports = ["22"] 8 | } 9 | 10 | target_tags = ["${var.network}-firewall-ssh"] 11 | source_ranges = ["0.0.0.0/0"] 12 | } 13 | 14 | resource "google_compute_firewall" "http" { 15 | name = "${var.network}-firewall-http" 16 | network = "${google_compute_network.ovirt_network.name}" 17 | 18 | allow { 19 | protocol = "tcp" 20 | ports = ["80"] 21 | } 22 | 23 | target_tags = ["${var.network}-firewall-http"] 24 | source_ranges = ["0.0.0.0/0"] 25 | } 26 | 27 | resource "google_compute_firewall" "https" { 28 | name = "${var.network}-firewall-https" 29 | network = "${google_compute_network.ovirt_network.name}" 30 | 31 | allow { 32 | protocol = "tcp" 33 | ports = ["443"] 34 | } 35 | 36 | target_tags = ["${var.network}-firewall-https"] 37 | source_ranges = ["0.0.0.0/0"] 38 | } 39 | 40 | resource "google_compute_firewall" "icmp" { 41 | name = "${var.network}-firewall-icmp" 42 | network = "${google_compute_network.ovirt_network.name}" 43 | 44 | allow { 45 | protocol = "icmp" 46 | } 47 | 48 | target_tags = ["${var.network}-firewall-icmp"] 49 | source_ranges = ["0.0.0.0/0"] 50 | } 51 | 52 | resource "google_compute_firewall" "postgresql" { 53 | name = "${var.network}-firewall-postgresql" 54 | network = "${google_compute_network.ovirt_network.name}" 55 | 56 | allow { 57 | protocol = "tcp" 58 | ports = ["5432"] 59 | } 60 | 61 | target_tags = ["${var.network}-firewall-postgresql"] 62 | source_ranges = ["0.0.0.0/0"] 63 | } 64 | 65 | resource "google_compute_firewall" "firewall-openshift-console" { 66 | name = "${var.network}-firewall-openshift-console" 67 | network = "${google_compute_network.ovirt_network.name}" 68 | 69 | allow { 70 | protocol = "tcp" 71 | ports = ["8443"] 72 | } 73 | 74 | target_tags = ["${var.network}-firewall-openshift-console"] 75 | source_ranges = ["0.0.0.0/0"] 76 | } 77 | 78 | resource "google_compute_firewall" "firewall-secure-forward" { 79 | name = "${var.network}-firewall-secure-forward" 80 | network = "${google_compute_network.ovirt_network.name}" 81 | 82 | allow { 83 | protocol = "tcp" 84 | ports = ["24284"] 85 | } 86 | 87 | target_tags = ["${var.network}-firewall-secure-forward"] 88 | source_ranges = ["0.0.0.0/0"] 89 | } 90 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/main.tf: -------------------------------------------------------------------------------- 1 | resource "google_compute_instance" "ovirt-engine-instance" { 2 | name = "ovirt-engine" 3 | 4 | ## for a setup having multiple instances of the same type, you can do 5 | ## the following, there would be 2 instances of the same configuration 6 | ## provisioned 7 | # count = 2 8 | # name = "${var.instance-name}-${count.index}" 9 | machine_type = "${var.vm_type["1point7gig"]}" 10 | 11 | zone = "${var.region}" 12 | 13 | tags = [ 14 | "${var.network}-firewall-ssh", 15 | "${var.network}-firewall-http", 16 | "${var.network}-firewall-https", 17 | "${var.network}-firewall-icmp", 18 | "${var.network}-firewall-postgresql", 19 | "${var.network}-firewall-openshift-console", 20 | "${var.network}-firewall-secure-forward", 21 | ] 22 | 23 | disk { 24 | image = "${var.os["centos7"]}" 25 | } 26 | 27 | metadata { 28 | hostname = "engine.ovirt.org" 29 | } 30 | 31 | network_interface { 32 | subnetwork = "${google_compute_subnetwork.ovirt_network_subnetwork.name}" 33 | 34 | access_config { 35 | // Ephemeral IP 36 | } 37 | } 38 | } 39 | 40 | resource "google_compute_instance" "metrics-store-instance" { 41 | name = "metrics-store" 42 | 43 | ## for a setup having multiple instances of the same type, you can do 44 | ## the following, there would be 2 instances of the same configuration 45 | ## provisioned 46 | # count = 2 47 | # name = "${var.instance-name}-${count.index}" 48 | machine_type = "${var.vm_type["7point5gig"]}" 49 | 50 | zone = "${var.region}" 51 | 52 | tags = [ 53 | "${var.network}-firewall-ssh", 54 | "${var.network}-firewall-http", 55 | "${var.network}-firewall-https", 56 | "${var.network}-firewall-icmp", 57 | "${var.network}-firewall-postgresql", 58 | "${var.network}-firewall-openshift-console", 59 | "${var.network}-firewall-secure-forward", 60 | ] 61 | 62 | disk { 63 | image = "${var.os["centos7"]}" 64 | size = 20 65 | } 66 | 67 | metadata { 68 | hostname = "metrics.ovirt.org" 69 | } 70 | 71 | network_interface { 72 | subnetwork = "${google_compute_subnetwork.ovirt_network_subnetwork.name}" 73 | 74 | access_config { 75 | // Ephemeral IP 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/network.tf: -------------------------------------------------------------------------------- 1 | resource "google_compute_network" "ovirt_network" { 2 | name = "${var.network}" 3 | } 4 | 5 | resource "google_compute_subnetwork" "ovirt_network_subnetwork" { 6 | name = "${var.network}-subnetwork-${var.subnetwork-region}" 7 | region = "${var.subnetwork-region}" 8 | network = "${google_compute_network.ovirt_network.self_link}" 9 | ip_cidr_range = "10.0.0.0/16" 10 | } 11 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/provider.tf: -------------------------------------------------------------------------------- 1 | provider "google" { 2 | credentials = "${file("${path.module}/../credentials/account.json")}" 3 | project = "${var.project-name}" 4 | region = "${var.region}" 5 | } 6 | -------------------------------------------------------------------------------- /single-and-multi-node-compute-vm/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | default = "us-west1-a" # Oregon 3 | } 4 | 5 | variable "project-name" { 6 | default = "gsoc-172407" 7 | } 8 | 9 | variable "subnetwork-region" { 10 | default = "us-west1" 11 | } 12 | 13 | variable "network" { 14 | default = "ovirt-network" 15 | } 16 | 17 | variable "vm_type" { 18 | default { 19 | "512gig" = "f1-micro" 20 | "1point7gig" = "g1-small" 21 | "7point5gig" = "n1-standard-2" 22 | } 23 | } 24 | 25 | variable "os" { 26 | default { 27 | "centos7" = "centos-7-v20170816" 28 | "debian9" = "debian-9-stretch-v20170816" 29 | "ubuntu-1604-lts" = "ubuntu-1604-xenial-v20170815a" 30 | "ubuntu-1704" = "ubuntu-1704-zesty-v20170811" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test-env/README.md: -------------------------------------------------------------------------------- 1 | ## test-env 2 | 3 | This environment contains a separate VPC created from `test-vpc` with some default firewall rules. A test-instance as a personal test environment. 4 | 5 | ## Order of execution 6 | 7 | ``` 8 | $ terraform plan 9 | $ terraform apply 10 | ``` 11 | 12 | inside 13 | 14 | 1. `test-vpc` 15 | 16 | 2. `test-gcp-instance` 17 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/backend.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "gcs" { 3 | bucket = "tasdikrahman-test-env-terraform-state" 4 | path = "tf/test-env/test-gcp-instance/terraform.tfstate" 5 | project = "tasdik-test-env" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/data.tf: -------------------------------------------------------------------------------- 1 | data "google_compute_subnetwork" "test-vpc-subnet" { 2 | name = "${var.vpc}-subnet" 3 | region = "${var.subnetwork_region}" 4 | } 5 | 6 | data "google_compute_network" "test-vpc" { 7 | name = "${var.vpc}" 8 | } 9 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/firewall.tf: -------------------------------------------------------------------------------- 1 | module "firewall-ssh" { 2 | source = "github.com/tasdikrahman/terraform-gcp-network-firewall" 3 | name = "ssh" 4 | network = "${data.google_compute_network.test-vpc.name}" 5 | protocol = "tcp" 6 | ports = ["22"] 7 | source_ranges = ["0.0.0.0/0"] 8 | } 9 | 10 | module "firewall-http" { 11 | source = "github.com/tasdikrahman/terraform-gcp-network-firewall" 12 | name = "http" 13 | network = "${data.google_compute_network.test-vpc.name}" 14 | protocol = "tcp" 15 | ports = ["80"] 16 | source_ranges = ["0.0.0.0/0"] 17 | } 18 | 19 | module "firewall-https" { 20 | source = "github.com/tasdikrahman/terraform-gcp-network-firewall" 21 | name = "https" 22 | network = "${data.google_compute_network.test-vpc.name}" 23 | protocol = "tcp" 24 | ports = ["443"] 25 | source_ranges = ["0.0.0.0/0"] 26 | } 27 | 28 | resource "google_compute_firewall" "icmp" { 29 | name = "${var.vpc}-firewall-icmp" 30 | network = "${data.google_compute_network.test-vpc.name}" 31 | 32 | allow { 33 | protocol = "icmp" 34 | } 35 | 36 | target_tags = ["${var.vpc}-firewall-icmp"] 37 | source_ranges = ["0.0.0.0/0"] 38 | } 39 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/main.tf: -------------------------------------------------------------------------------- 1 | resource "google_compute_instance" "test-instance" { 2 | name = "test-instance" 3 | machine_type = "f1-micro" 4 | 5 | zone = "${var.region}" 6 | 7 | tags = [ 8 | "${var.vpc}-firewall-ssh", 9 | "${var.vpc}-firewall-http", 10 | "${var.vpc}-firewall-https", 11 | "${var.vpc}-firewall-icmp", 12 | ] 13 | 14 | disk { 15 | image = "${var.os["ubuntu-1604-lts"]}" 16 | } 17 | 18 | network_interface { 19 | subnetwork = "${data.google_compute_subnetwork.test-vpc-subnet.name}" 20 | 21 | access_config { 22 | // Ephemeral IP 23 | } 24 | } 25 | 26 | service_account { 27 | scopes = ["userinfo-email", "compute-ro", "storage-ro"] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/state.tf: -------------------------------------------------------------------------------- 1 | provider "google" { 2 | credentials = "${file("${path.module}/../../credentials/account.json")}" 3 | project = "${var.project-name}" 4 | region = "${var.region}" 5 | } 6 | -------------------------------------------------------------------------------- /test-env/test-gcp-instance/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | default = "us-west1-a" # Oregon 3 | } 4 | 5 | variable "project-name" { 6 | default = "tasdik-test-env" 7 | } 8 | 9 | variable "subnetwork_region" { 10 | default = "us-west1" 11 | } 12 | 13 | variable "os" { 14 | default { 15 | "centos7" = "centos-7-v20170816" 16 | "debian9" = "debian-9-stretch-v20170816" 17 | "ubuntu-1604-lts" = "ubuntu-1604-xenial-v20170815a" 18 | "ubuntu-1704" = "ubuntu-1704-zesty-v20170811" 19 | } 20 | } 21 | 22 | variable "vpc" { 23 | default = "test-vpc" 24 | } 25 | -------------------------------------------------------------------------------- /test-env/test-vpc/backend.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "gcs" { 3 | bucket = "tasdikrahman-test-env-terraform-state" 4 | path = "tf/test-env/test-vpc/terraform.tfstate" 5 | project = "tasdik-test-env" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test-env/test-vpc/main.tf: -------------------------------------------------------------------------------- 1 | module "personal-vpc" { 2 | source = "github.com/tasdikrahman/terraform-gcp-network" 3 | name = "${var.vpc_name}" 4 | } 5 | 6 | module "subnet-personal-vpc" { 7 | source = "github.com/tasdikrahman/terraform-gcp-network-subnet" 8 | name = "${var.subnet_name}" 9 | vpc = "${module.personal-vpc.self_link}" 10 | subnetwork-region = "${var.subnetwork_region}" 11 | ip_cidr_range = "${var.ip_cidr_range}" 12 | } 13 | -------------------------------------------------------------------------------- /test-env/test-vpc/provider.tf: -------------------------------------------------------------------------------- 1 | provider "google" { 2 | credentials = "${file("${path.module}/../../credentials/account.json")}" 3 | project = "${var.project-name}" 4 | region = "${var.region}" 5 | } 6 | -------------------------------------------------------------------------------- /test-env/test-vpc/variables.tf: -------------------------------------------------------------------------------- 1 | variable "vpc_name" { 2 | default = "test-vpc" 3 | } 4 | 5 | variable "subnet_name" { 6 | default = "test-vpc-subnet" 7 | } 8 | 9 | variable "ip_cidr_range" { 10 | default = "10.0.0.0/8" 11 | } 12 | 13 | variable "subnetwork_region" { 14 | default = "us-west1" 15 | } 16 | 17 | variable "region" { 18 | default = "us-west1-a" # Oregon 19 | } 20 | 21 | variable "project-name" { 22 | default = "tasdik-test-env" 23 | } 24 | --------------------------------------------------------------------------------