mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Adding configuration endpoint to the elasticache cluster nodes
This commit is contained in:
parent
28ea44b1ff
commit
029f1fa572
@ -105,6 +105,10 @@ func resourceAwsElasticacheCluster() *schema.Resource {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"configuration_endpoint": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -233,6 +237,7 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{})
|
||||
if c.ConfigurationEndpoint != nil {
|
||||
d.Set("port", c.ConfigurationEndpoint.Port)
|
||||
}
|
||||
|
||||
d.Set("subnet_group_name", c.CacheSubnetGroupName)
|
||||
d.Set("security_group_names", c.CacheSecurityGroups)
|
||||
d.Set("security_group_ids", c.SecurityGroups)
|
||||
@ -353,6 +358,7 @@ func setCacheNodeData(d *schema.ResourceData, c *elasticache.CacheCluster) error
|
||||
"id": *node.CacheNodeId,
|
||||
"address": *node.Endpoint.Address,
|
||||
"port": int(*node.Endpoint.Port),
|
||||
"configuration_endpoint": fmt.Sprintf("%s:%d", *node.Endpoint.Address, *node.Endpoint.Port),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ Example: `arn:aws:s3:::my_bucket/snapshot1.rdb`
|
||||
|
||||
The following attributes are exported:
|
||||
|
||||
* `cache_nodes` - List of node objects including `id`, `address` and `port`.
|
||||
* `cache_nodes` - List of node objects including `id`, `address`, `port` and `configuration_endpoint`.
|
||||
Referenceable e.g. as `${aws_elasticache_cluster.bar.cache_nodes.0.address}`
|
||||
|
||||
[1]: http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheCluster.html
|
||||
|
Loading…
Reference in New Issue
Block a user