From d03558ad083dc7baf25ac4389614f83b4d10e02f Mon Sep 17 00:00:00 2001 From: Santos92 Date: Thu, 16 Apr 2020 15:48:42 +0200 Subject: [PATCH 1/5] added connect_mode --- main.tf | 1 + variables.tf | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 705e0ec6..9a989e25 100644 --- a/main.tf +++ b/main.tf @@ -21,6 +21,7 @@ resource "google_redis_instance" "default" { name = var.name tier = var.tier memory_size_gb = var.memory_size_gb + connect_mode = var.connect_mode region = var.region location_id = var.location_id diff --git a/variables.tf b/variables.tf index 3075b962..1f517c78 100644 --- a/variables.tf +++ b/variables.tf @@ -84,8 +84,14 @@ variable "reserved_ip_range" { default = null } +variable "connect_mode" { + description = "The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING." + type = string + default = null +} + variable "labels" { description = "The resource labels to represent user provided metadata." type = map(string) default = null -} +} \ No newline at end of file From 07b0f54f0e5680b39c82ca59a11f4b67e8c7c035 Mon Sep 17 00:00:00 2001 From: Santos92 Date: Thu, 16 Apr 2020 15:51:55 +0200 Subject: [PATCH 2/5] updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fb71cc32..f49d2f53 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ module "memorystore" { |------|-------------|:----:|:-----:|:-----:| | alternative\_location\_id | The alternative zone where the instance will be provisioned. | string | `"null"` | no | | authorized\_network | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | string | `"null"` | no | +| connect\_mode | The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING. | string | `"null"` | no | | display\_name | An arbitrary and optional user-provided name for the instance. | string | `"null"` | no | | enable\_apis | Flag for enabling redis.googleapis.com in your project | bool | `"true"` | no | | labels | The resource labels to represent user provided metadata. | map(string) | `"null"` | no | From 443cddb9f6a4f7ea76a98a23b912bbb1508502ca Mon Sep 17 00:00:00 2001 From: Santos92 Date: Thu, 16 Apr 2020 15:55:46 +0200 Subject: [PATCH 3/5] newline at end of file --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 1f517c78..562d6e45 100644 --- a/variables.tf +++ b/variables.tf @@ -94,4 +94,4 @@ variable "labels" { description = "The resource labels to represent user provided metadata." type = map(string) default = null -} \ No newline at end of file +} From 19067f6a8b3702622664a220f5854dd88391d228 Mon Sep 17 00:00:00 2001 From: Santos92 Date: Thu, 16 Apr 2020 17:49:42 +0200 Subject: [PATCH 4/5] added required providers in versions.tf --- versions.tf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/versions.tf b/versions.tf index 29704272..f6bd8023 100644 --- a/versions.tf +++ b/versions.tf @@ -16,4 +16,7 @@ terraform { required_version = ">= 0.12" -} + required_providers { + google = ">= 3.14.0" + } +} \ No newline at end of file From 2cfd9cba2d945c644419cd58ac8e8203ba274900 Mon Sep 17 00:00:00 2001 From: Santos92 Date: Thu, 16 Apr 2020 18:00:00 +0200 Subject: [PATCH 5/5] changed provider version under examples --- examples/basic/memorystore.tf | 2 +- examples/basic/versions.tf | 3 +++ versions.tf | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/basic/memorystore.tf b/examples/basic/memorystore.tf index f7e28125..97a02c21 100644 --- a/examples/basic/memorystore.tf +++ b/examples/basic/memorystore.tf @@ -15,7 +15,7 @@ */ provider "google" { - version = "~> 2.5.0" + version = "~> 3.14.0" } module "memorystore" { diff --git a/examples/basic/versions.tf b/examples/basic/versions.tf index 29704272..60190546 100644 --- a/examples/basic/versions.tf +++ b/examples/basic/versions.tf @@ -16,4 +16,7 @@ terraform { required_version = ">= 0.12" + required_providers { + google = ">= 3.14.0" + } } diff --git a/versions.tf b/versions.tf index f6bd8023..60190546 100644 --- a/versions.tf +++ b/versions.tf @@ -19,4 +19,4 @@ terraform { required_providers { google = ">= 3.14.0" } -} \ No newline at end of file +}