From 02585cbd3c52b508fc77c63e76113aafd0741064 Mon Sep 17 00:00:00 2001 From: Andrey Kumanov Date: Mon, 24 Sep 2018 16:03:16 -0700 Subject: [PATCH] Update subnet_flow_logs and subnet_private_access to string from boolean in module, examples, and README.md --- README.md | 8 ++++---- examples/multi_vpc/main.tf | 20 ++++++++++---------- examples/simple_project/main.tf | 4 ++-- main.tf | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ddd53340..e9d06b3b 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ module "vpc" { subnet_name = "subnet-02" subnet_ip = "10.10.20.0/24" subnet_region = "us-west1" - subnet_private_access = true - subnet_flow_logs = true + subnet_private_access = "true" + subnet_flow_logs = "true" }, ] @@ -73,8 +73,8 @@ The subnets list contains maps, where each object represents a subnet. Each map | subnet_name | The name of the subnet being created | string | - | yes | | subnet_ip | The IP and CIDR range of the subnet being created | string | - | yes | | subnet_region | The region where the subnet will be created | string | - | yes | -| subnet_private_access | Whether this subnet will have private Google access enabled | boolean | false | no | -| subnet_flow_logs | Whether the subnet will record and send flow log data to logging | boolean | false | no | +| subnet_private_access | Whether this subnet will have private Google access enabled | string | false | no | +| subnet_flow_logs | Whether the subnet will record and send flow log data to logging | string | false | no | ## Outputs diff --git a/examples/multi_vpc/main.tf b/examples/multi_vpc/main.tf index 96effd8d..bc27bcf1 100644 --- a/examples/multi_vpc/main.tf +++ b/examples/multi_vpc/main.tf @@ -24,22 +24,22 @@ module "test-vpc-module-01" { subnet_name = "test-network-01-subnet-01" subnet_ip = "10.10.10.0/24" subnet_region = "us-west1" - subnet_private_access = false - subnet_flow_logs = true + subnet_private_access = "false" + subnet_flow_logs = "true" }, { subnet_name = "test-network-01-subnet-02" subnet_ip = "10.10.20.0/24" subnet_region = "us-west1" - subnet_private_access = false - subnet_flow_logs = true + subnet_private_access = "false" + subnet_flow_logs = "true" }, { subnet_name = "test-network-01-subnet-03" subnet_ip = "10.10.30.0/24" subnet_region = "us-west1" - subnet_private_access = false - subnet_flow_logs = true + subnet_private_access = "false" + subnet_flow_logs = "true" }, ] @@ -76,15 +76,15 @@ module "test-vpc-module-02" { subnet_name = "test-network-02-subnet-01" subnet_ip = "10.10.40.0/24" subnet_region = "us-west1" - subnet_private_access = false - subnet_flow_logs = true + subnet_private_access = "false" + subnet_flow_logs = "true" }, { subnet_name = "test-network-02-subnet-02" subnet_ip = "10.10.50.0/24" subnet_region = "us-west1" - subnet_private_access = false - subnet_flow_logs = true + subnet_private_access = "false" + subnet_flow_logs = "true" }, ] diff --git a/examples/simple_project/main.tf b/examples/simple_project/main.tf index 539c20b4..f2f09b0c 100644 --- a/examples/simple_project/main.tf +++ b/examples/simple_project/main.tf @@ -29,8 +29,8 @@ module "test-vpc-module" { subnet_name = "subnet-02" subnet_ip = "10.10.20.0/24" subnet_region = "us-west1" - subnet_private_access = true - subnet_flow_logs = true + subnet_private_access = "true" + subnet_flow_logs = "true" }, ] diff --git a/main.tf b/main.tf index f5ac5265..ba7ee03c 100644 --- a/main.tf +++ b/main.tf @@ -33,8 +33,8 @@ resource "google_compute_subnetwork" "subnetwork" { name = "${lookup(var.subnets[count.index], "subnet_name")}" ip_cidr_range = "${lookup(var.subnets[count.index], "subnet_ip")}" region = "${lookup(var.subnets[count.index], "subnet_region")}" - private_ip_google_access = "${lookup(var.subnets[count.index], "subnet_private_access", false)}" - enable_flow_logs = "${lookup(var.subnets[count.index], "subnet_flow_logs", false)}" + private_ip_google_access = "${lookup(var.subnets[count.index], "subnet_private_access", "false")}" + enable_flow_logs = "${lookup(var.subnets[count.index], "subnet_flow_logs", "false")}" network = "${google_compute_network.network.name}" project = "${var.project_id}"