Skip to content

Commit

Permalink
feat: add kubernetes secret provider and redis url
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lefevre <[email protected]>
  • Loading branch information
ArchiFleKs committed Nov 22, 2019
1 parent 3f97172 commit a717764
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions elasticache.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ resource "kubernetes_secret" "redis_secrets" {
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 : ""
REDIS_URL = var.redis_token_enabled ? "redis://:${random_uuid.redis_token[0].result}@${var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].primary_endpoint_address : aws_elasticache_replication_group.redis[0].primary_endpoint_address}:${var.redis_port}": "redis://${var.redis_cluster_mode["enabled"] ? aws_elasticache_replication_group.redis_cluster[0].primary_endpoint_address : aws_elasticache_replication_group.redis[0].primary_endpoint_address}:${var.redis_port}"
}
}
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ output "redis_port" {
}

output "redis_token" {
value = var.redis_token_enabled ? random_uuid.redis_token[0].result : null
value = var.redis_token_enabled ? random_uuid.redis_token[0].result : null
sensitive = true
}
4 changes: 4 additions & 0 deletions providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ provider "aws" {
region = var.aws["region"]
}

provider "kubernetes" {
config_path = var.eks["kubeconfig_path"]
}

provider "helm" {
install_tiller = true
service_account = "tiller"
Expand Down

0 comments on commit a717764

Please sign in to comment.