Skip to content

Commit

Permalink
Add output key cluster_node_ips
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Sherman authored and ewbankkit committed Aug 31, 2021
1 parent 2f366fa commit b9db8a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aws/resource_aws_redshift_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,13 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er
}
d.Set("cluster_node_ips", nip)
}
var nip []string
for _, i := range rsc.ClusterNodes {
nip = append(nip, *i.PrivateIPAddress)
}
if err := d.Set("cluster_node_ips", nip); err != nil {
return fmt.Errorf("[DEBUG] Error saving Cluster Node IPs to state for Redshift Cluster (%s): %s", d.Id(), err)
}

d.Set("cluster_public_key", rsc.ClusterPublicKey)
d.Set("cluster_revision_number", rsc.ClusterRevisionNumber)
Expand Down

0 comments on commit b9db8a4

Please sign in to comment.