[provider/aws] check that we actually have NodeGroupMembers (#13488)

This commit is contained in:
Benjamin Lau 2017-06-05 07:07:46 -07:00 committed by Clint
parent 42fccffdf9
commit ef4e89c7be
1 changed files with 4 additions and 0 deletions

View File

@ -267,6 +267,10 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int
d.Set("replication_group_id", rgp.ReplicationGroupId)
if rgp.NodeGroups != nil {
if len(rgp.NodeGroups[0].NodeGroupMembers) == 0 {
return nil
}
cacheCluster := *rgp.NodeGroups[0].NodeGroupMembers[0]
res, err := conn.DescribeCacheClusters(&elasticache.DescribeCacheClustersInput{