我认为使用Redis的AWS ElastiCache有一个简单的Terraform配置:
resource "aws_elasticache_replication_group" "my_replication_group" {
replication_group_id = "my-rep-group",
replication_group_description = "eln00b"
node_type = "cache.m4.large"
port = 6379
parameter_group_name = "default.redis5.0.cluster.on"
snapshot_retention_limit = 1
snapshot_window = "00:00-05:00"
subnet_group_name = "${aws_elasticache_subnet_group.my_subnet_group.name}"
automatic_failover_enabled = true
cluster_mode {
num_node_groups = 1
replicas_per_node_group = 1
}
}我试图使用以下方法定义端点输出:
output "my_cache" {
value = "${aws_elasticache_replication_group.my_replication_group.primary_endpoint_address}"
}当我在陆地上进行申请时,我得到:
错误:运行计划错误:发生1次错误: 资源'aws_elasticache_replication_group.my_replication_group‘没有变量'aws_elasticache_replication_group.my_replication_group.primary_endpoint_address’的属性“primary_endpoint_address”
我在这里做错什么了?
发布于 2019-01-29 09:31:28
primary_endpoint_address属性仅适用于文档中提到的非群集模式Redis复制组。
primary_endpoint_address -(仅Redis)复制组中主节点的端点的地址(如果群集模式被禁用)。
当使用集群模式时,您应该使用configuration_endpoint_address来连接到Redis集群。
https://stackoverflow.com/questions/54411366
复制相似问题