diff --git a/.changelog/3891.txt b/.changelog/3891.txt new file mode 100644 index 0000000000..9e200bfa64 --- /dev/null +++ b/.changelog/3891.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +memcached: added discovery_endpoint to `resource_memcached_instance` +``` diff --git a/google-beta/resource_memcache_instance.go b/google-beta/resource_memcache_instance.go index 6dc552afdd..dbc936799b 100644 --- a/google-beta/resource_memcache_instance.go +++ b/google-beta/resource_memcache_instance.go @@ -149,6 +149,11 @@ provided, all zones will be used.`, Computed: true, Description: `Creation timestamp in RFC3339 text format.`, }, + "discovery_endpoint": { + Type: schema.TypeString, + Computed: true, + Description: `Endpoint for Discovery API`, + }, "memcache_full_version": { Type: schema.TypeString, Computed: true, @@ -335,6 +340,9 @@ func resourceMemcacheInstanceRead(d *schema.ResourceData, meta interface{}) erro if err := d.Set("create_time", flattenMemcacheInstanceCreateTime(res["createTime"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } + if err := d.Set("discovery_endpoint", flattenMemcacheInstanceDiscoveryEndpoint(res["discoveryEndpoint"], d, config)); err != nil { + return fmt.Errorf("Error reading Instance: %s", err) + } if err := d.Set("labels", flattenMemcacheInstanceLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -562,6 +570,10 @@ func flattenMemcacheInstanceCreateTime(v interface{}, d *schema.ResourceData, co return v } +func flattenMemcacheInstanceDiscoveryEndpoint(v interface{}, d *schema.ResourceData, config *Config) interface{} { + return v +} + func flattenMemcacheInstanceLabels(v interface{}, d *schema.ResourceData, config *Config) interface{} { return v } diff --git a/website/docs/r/memcache_instance.html.markdown b/website/docs/r/memcache_instance.html.markdown index d0be221abf..bab40fee3c 100644 --- a/website/docs/r/memcache_instance.html.markdown +++ b/website/docs/r/memcache_instance.html.markdown @@ -171,6 +171,9 @@ In addition to the arguments listed above, the following computed attributes are * `create_time` - Creation timestamp in RFC3339 text format. +* `discovery_endpoint` - + Endpoint for Discovery API + * `memcache_full_version` - The full version of memcached server running on this instance.