Commit e27d62a9 authored by Daisuke Fujita's avatar Daisuke Fujita

Merge pull request #112 from dtan4/elasticache-port

Stop including ElastiCache cluster port at any time
parents 552e80a3 6f109c58
......@@ -30,12 +30,15 @@ module Terraforming
"node_type" => cache_cluster.cache_node_type,
"num_cache_nodes" => "1",
"parameter_group_name" => cache_cluster.cache_parameter_group.cache_parameter_group_name,
"port" => "11211",
"security_group_ids.#" => security_group_ids_of(cache_cluster).length.to_s,
"security_group_names.#" => security_group_names_of(cache_cluster).length.to_s,
"subnet_group_name" => cache_cluster.cache_subnet_group_name,
"tags.#" => "0",
}
attributes["port"] =
cache_cluster.configuration_endpoint.port.to_s if cache_cluster.configuration_endpoint
resources["aws_elasticache_cluster.#{cache_cluster.cache_cluster_id}"] = {
"type" => "aws_elasticache_cluster",
"primary" => {
......
......@@ -6,7 +6,9 @@ resource "aws_elasticache_cluster" "<%= cache_cluster.cache_cluster_id %>" {
node_type = "<%= cache_cluster.cache_node_type %>"
num_cache_nodes = <%= cache_cluster.num_cache_nodes %>
parameter_group_name = "<%= cache_cluster.cache_parameter_group.cache_parameter_group_name %>"
<%- if cache_cluster.configuration_endpoint -%>
port = <%= cache_cluster.configuration_endpoint.port %>
<%- end -%>
<%- if cluster_in_vpc?(cache_cluster) -%>
subnet_group_name = "<%= cache_cluster.cache_subnet_group_name %>"
security_group_ids = <%= security_group_ids_of(cache_cluster).inspect %>
......
......@@ -52,10 +52,6 @@ module Terraforming
},
{
cache_cluster_id: "fuga",
configuration_endpoint: {
address: "fuga.def456.cfg.apne1.cache.amazonaws.com",
port: 11211
},
client_download_landing_page: "https://console.aws.amazon.com/elasticache/home#client-download:",
cache_node_type: "cache.t2.micro",
engine: "redis",
......@@ -120,7 +116,6 @@ resource "aws_elasticache_cluster" "fuga" {
node_type = "cache.t2.micro"
num_cache_nodes = 1
parameter_group_name = "default.redis2.8"
port = 11211
security_group_names = ["sg-hoge"]
}
......@@ -165,7 +160,6 @@ resource "aws_elasticache_cluster" "fuga" {
"node_type" => "cache.t2.micro",
"num_cache_nodes" => "1",
"parameter_group_name" => "default.redis2.8",
"port" => "11211",
"security_group_ids.#" => "0",
"security_group_names.#" => "1",
"subnet_group_name" => "subnet-fuga",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment