From 4639aceb534178fedfcc7f306a6d4ec173e5c318 Mon Sep 17 00:00:00 2001 From: Dominic Ferramosi Date: Mon, 27 Sep 2021 10:31:39 -0700 Subject: [PATCH] feat: Add discovery endpoint output to memcache module (#62) * add discovery endpoint to memcache module * formatting fixes --- examples/memcache/outputs.tf | 4 ++++ modules/memcache/README.md | 1 + modules/memcache/outputs.tf | 5 +++++ test/integration/memcache/inspec.yml | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/memcache/outputs.tf b/examples/memcache/outputs.tf index e01600c9..697e3529 100644 --- a/examples/memcache/outputs.tf +++ b/examples/memcache/outputs.tf @@ -46,3 +46,7 @@ output "output_region" { output "output_nodes" { value = module.memcache.nodes } + +output "output_discovery" { + value = module.memcache.discovery +} diff --git a/modules/memcache/README.md b/modules/memcache/README.md index cc8b4cd1..80cf97ca 100644 --- a/modules/memcache/README.md +++ b/modules/memcache/README.md @@ -25,6 +25,7 @@ A Terraform module for creating a fully functional Google Memorystore (memcache) | Name | Description | |------|-------------| +| discovery | The memorystore discovery endpoint. | | id | The memorystore instance ID. | | nodes | Data about the memcache nodes | | region | The region the instance lives in. | diff --git a/modules/memcache/outputs.tf b/modules/memcache/outputs.tf index 1ebca83b..cec55dff 100644 --- a/modules/memcache/outputs.tf +++ b/modules/memcache/outputs.tf @@ -28,3 +28,8 @@ output "nodes" { description = "Data about the memcache nodes" value = google_memcache_instance.self.memcache_nodes } + +output "discovery" { + description = "The memorystore discovery endpoint." + value = google_memcache_instance.self.discovery_endpoint +} diff --git a/test/integration/memcache/inspec.yml b/test/integration/memcache/inspec.yml index 5e023b14..d36a5fcc 100644 --- a/test/integration/memcache/inspec.yml +++ b/test/integration/memcache/inspec.yml @@ -41,4 +41,6 @@ attributes: - name: output_nodes required: true type: hash - + - name: output_discovery + required: true + type: string