Skip to content

Commit

Permalink
Add Redis credentials via Sumaform node variables (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios authored Oct 15, 2024
1 parent d42c736 commit 8b51c54
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions terracumber_config/tf_files/Uyuni-Master-tests-code-coverage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ variable "GIT_PASSWORD" {
default = null // Not needed for master, as it is public
}

variable "REDIS_HOST" {
type = string
default = null
}

variable "REDIS_USERNAME" {
type = string
default = null
}

variable "REDIS_PASSWORD" {
type = string
default = null
}

terraform {
required_version = "1.0.10"
required_providers {
Expand Down Expand Up @@ -263,10 +278,10 @@ resource "null_resource" "configure_jacoco" {
// This is just a temporary Redis instance for this PoC, no worries about it for now, but it will be good in the future to hide it as secrets in this repo
// Only an admin of this repo will have rights to do that.
provisioner "remote-exec" {
inline = [ "echo export REDIS_HOST=redis-19269.c285.us-west-2-2.ec2.cloud.redislabs.com >> ~/.bashrc",
inline = [ "echo export REDIS_HOST=${var.REDIS_HOST} >> ~/.bashrc",
"echo export REDIS_PORT=19269 >> ~/.bashrc",
"echo export REDIS_USERNAME=default >> ~/.bashrc",
"echo export REDIS_PASSWORD=I4Wxta4v5wpZGWQgUAUpnMQf35zmZGqx >> ~/.bashrc",
"echo export REDIS_USERNAME=${var.REDIS_USERNAME} >> ~/.bashrc",
"echo export REDIS_PASSWORD=${var.REDIS_PASSWORD} >> ~/.bashrc",
"source ~/.bashrc"
]
connection {
Expand Down

0 comments on commit 8b51c54

Please sign in to comment.