Skip to content

Commit cc2d7b0

Browse files
authored
chore: add connection metadata and output type (#225)
1 parent 694d541 commit cc2d7b0

File tree

7 files changed

+50
-5
lines changed

7 files changed

+50
-5
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.21
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

@@ -68,6 +68,7 @@ docker_test_integration:
6868
.PHONY: docker_test_lint
6969
docker_test_lint:
7070
docker run --rm -it \
71+
-e ENABLE_BPMETADATA \
7172
-v "$(CURDIR)":/workspace \
7273
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
7374
/usr/local/bin/test_lint.sh
@@ -76,7 +77,6 @@ docker_test_lint:
7677
.PHONY: docker_generate_docs
7778
docker_generate_docs:
7879
docker run --rm -it \
79-
-e ENABLE_BPMETADATA \
8080
-v "$(CURDIR)":/workspace \
8181
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
8282
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# [Google Cloud Memorystore Terraform Module](https://registry.terraform.io/modules/terraform-google-modules/memorystore/google/)
1+
# Google Cloud Memorystore Terraform Module
2+
[terraform registry](https://registry.terraform.io/modules/terraform-google-modules/memorystore/google/)
23

34
A Terraform module for creating a fully functional Google Memorystore Redis instance. For Memcache and Redis Cluster see [sub-modules](./modules/)
45

examples/redis/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "memstore" {
1818
source = "terraform-google-modules/memorystore/google"
19-
version = "~> 9.0"
19+
version = "~> 10.0"
2020

2121
name = "test-redis"
2222

metadata.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ metadata:
2020
config.kubernetes.io/local-config: "true"
2121
spec:
2222
info:
23+
title: Google Cloud Memorystore Terraform Module
2324
source:
2425
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git
2526
sourceType: git
@@ -57,6 +58,12 @@ spec:
5758
- name: authorized_network
5859
description: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.
5960
varType: string
61+
connections:
62+
- source:
63+
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc
64+
version: v9.1.0
65+
spec:
66+
outputExpr: network_name
6067
- name: connect_mode
6168
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.
6269
varType: string
@@ -141,24 +148,52 @@ spec:
141148
outputs:
142149
- name: auth_string
143150
description: AUTH String set on the instance. This field will only be populated if auth_enabled is true.
151+
type: string
144152
- name: current_location_id
145153
description: The current zone where the Redis endpoint is placed.
154+
type: string
146155
- name: env_vars
147156
description: Exported environment variables
157+
type: [
158+
"object",
159+
{
160+
"REDIS_HOST": "string",
161+
"REDIS_PORT": "number"
162+
}
163+
]
148164
- name: host
149165
description: The IP address of the instance.
166+
type: string
150167
- name: id
151168
description: The memorystore instance ID.
169+
type: string
152170
- name: persistence_iam_identity
153171
description: Cloud IAM identity used by import/export operations. Format is 'serviceAccount:'. May change over time
172+
type: string
154173
- name: port
155174
description: The port number of the exposed Redis endpoint.
175+
type: number
156176
- name: read_endpoint
157177
description: " The IP address of the exposed readonly Redis endpoint."
178+
type: string
158179
- name: region
159180
description: The region the instance lives in.
181+
type: string
160182
- name: server_ca_certs
161183
description: List of server CA certificates for the instance
184+
type: [
185+
"list",
186+
[
187+
"object",
188+
{
189+
"cert": "string",
190+
"create_time": "string",
191+
"expire_time": "string",
192+
"serial_number": "string",
193+
"sha1_fingerprint": "string"
194+
}
195+
]
196+
]
162197
requirements:
163198
roles:
164199
- level: Project

modules/memcache/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# [Google Cloud Memorystore Terraform Module](https://registry.terraform.io/modules/terraform-google-modules/memorystore/google/)
1+
# Google Cloud Memorystore Terraform Module
2+
[terraform registry](https://registry.terraform.io/modules/terraform-google-modules/memorystore/google/)
23

34
A Terraform module for creating a fully functional Google Memorystore (memcache) instance.
45

modules/memcache/metadata.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ metadata:
2020
config.kubernetes.io/local-config: "true"
2121
spec:
2222
info:
23+
title: Google Cloud Memorystore Terraform Module
2324
source:
2425
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git
2526
sourceType: git

modules/redis-cluster/metadata.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ spec:
106106
description: "The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. Default value is TRANSIT_ENCRYPTION_MODE_DISABLED. Possible values are: TRANSIT_ENCRYPTION_MODE_UNSPECIFIED, TRANSIT_ENCRYPTION_MODE_DISABLED, TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"
107107
varType: string
108108
defaultValue: TRANSIT_ENCRYPTION_MODE_DISABLED
109+
- name: zone_distribution_config_mode
110+
description: "The mode for zone distribution for Memorystore Redis cluster (Immutable). If not provided, MULTI_ZONE will be used as default value. Possible values are: MULTI_ZONE, SINGLE_ZONE"
111+
varType: string
112+
defaultValue: MULTI_ZONE
113+
- name: zone_distribution_config_zone
114+
description: The zone for single zone Memorystore Redis cluster (Immutable)
115+
varType: string
109116
outputs:
110117
- name: discovery_endpoints
111118
description: Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one endpoint is supported

0 commit comments

Comments
 (0)