Merge branch 'A-Gordon-aws_elasticache_cluster_address'
This commit is contained in:
commit
25ae6d2555
|
@ -170,6 +170,11 @@ func resourceAwsElasticacheCluster() *schema.Resource {
|
|||
Computed: true,
|
||||
}
|
||||
|
||||
resourceSchema["cluster_address"] = &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
}
|
||||
|
||||
resourceSchema["replication_group_id"] = &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
|
@ -348,6 +353,7 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{})
|
|||
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("cluster_address", aws.String(fmt.Sprintf("%s", *c.ConfigurationEndpoint.Address)))
|
||||
}
|
||||
|
||||
if c.ReplicationGroupId != nil {
|
||||
|
|
|
@ -27,6 +27,8 @@ func TestAccAWSElasticacheCluster_basic(t *testing.T) {
|
|||
testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar", &ec),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_elasticache_cluster.bar", "cache_nodes.0.id", "0001"),
|
||||
resource.TestCheckResourceAttrSet("aws_elasticache_cluster.bar", "configuration_endpoint"),
|
||||
resource.TestCheckResourceAttrSet("aws_elasticache_cluster.bar", "cluster_address"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue