Merge pull request #3250 from stack72/aws-elasticache-configuration_endpoint
Adding configuration endpoint to the elasticache cluster nodes
This commit is contained in:
commit
028e50bae6
|
@ -29,6 +29,10 @@ func resourceAwsElasticacheCluster() *schema.Resource {
|
|||
Required: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
"configuration_endpoint": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"engine": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
|
@ -232,7 +236,9 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{})
|
|||
d.Set("engine_version", c.EngineVersion)
|
||||
if c.ConfigurationEndpoint != nil {
|
||||
d.Set("port", c.ConfigurationEndpoint.Port)
|
||||
d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ConfigurationEndpoint.Address, *c.ConfigurationEndpoint.Port)))
|
||||
}
|
||||
|
||||
d.Set("subnet_group_name", c.CacheSubnetGroupName)
|
||||
d.Set("security_group_names", c.CacheSecurityGroups)
|
||||
d.Set("security_group_ids", c.SecurityGroups)
|
||||
|
|
|
@ -83,4 +83,6 @@ The following attributes are exported:
|
|||
* `cache_nodes` - List of node objects including `id`, `address` and `port`.
|
||||
Referenceable e.g. as `${aws_elasticache_cluster.bar.cache_nodes.0.address}`
|
||||
|
||||
* `configuration_endpoint` - (Memcached only) The configuration endpoint to allow host discovery
|
||||
|
||||
[1]: http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheCluster.html
|
||||
|
|
Loading…
Reference in New Issue