Skip to content

Commit

Permalink
chore: terraform fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lefevre <[email protected]>
  • Loading branch information
ArchiFleKs committed Nov 5, 2019
1 parent 1f64b17 commit f0fae31
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions elasticache.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ resource "kubernetes_secret" "redis_secrets" {
namespace = var.inject_secret_into_ns[count.index]
}

data = {
data = {
REDIS_PRIMARY_ENDPOINT_ADDRESS = var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].primary_endpoint_address : aws_elasticache_replication_group.redis[0].primary_endpoint_address
REDIS_CONFIGURATION_ENDPOINT_ADDRESS = var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].configuration_endpoint_address : aws_elasticache_replication_group.redis[0].configuration_endpoint_address
REDIS_MEMBER_CLUSTERS = join(",",var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].member_clusters : aws_elasticache_replication_group.redis[0].member_clusters)
REDIS_MEMBER_CLUSTERS = join(",", var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].member_clusters : aws_elasticache_replication_group.redis[0].member_clusters)
REDIS_PORT = var.redis_port
REDIS_AUTH = var.redis_token_enabled ? random_uuid.redis_token[0].result : null
}
Expand Down
6 changes: 3 additions & 3 deletions redis-exporter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ resource "helm_release" "redis_exporter" {
}

resource "kubernetes_config_map" "stunnel" {
count = var.redis_exporter["enabled"] ? 1 : 0
count = var.redis_exporter["enabled"] ? 1 : 0
metadata {
name = "${var.redis_id}-${var.env}-stunnel-config"
namespace = "monitoring"
}

data = {
"stunnel.conf" = "${templatefile("templates/stunnel.tpl", { redis_host = var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].configuration_endpoint_address : aws_elasticache_replication_group.redis[0].primary_endpoint_address, redis_port =var.redis_port})}"
data = {
"stunnel.conf" = "${templatefile("templates/stunnel.tpl", { redis_host = var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].configuration_endpoint_address : aws_elasticache_replication_group.redis[0].primary_endpoint_address, redis_port = var.redis_port })}"
}
}
12 changes: 6 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ variable "redis_port" {
}

variable "redis_security_group_ids" {
type = list
type = list
default = []
}

Expand Down Expand Up @@ -78,9 +78,9 @@ variable "tags" {
}

variable "redis_cluster_mode" {
type = any
default = {
enabled = false
type = any
default = {
enabled = false
}
}

Expand All @@ -95,14 +95,14 @@ variable "inject_secret_into_ns" {
}

variable "redis_exporter" {
type = any
type = any
}

variable "redis_token_enabled" {
default = false
}

variable "redis_subnets" {
type = list
type = list
default = []
}

0 comments on commit f0fae31

Please sign in to comment.