Refactor database path variables in Ansible and Terraform playbooks; add local database folder variable
This commit is contained in:
@@ -142,13 +142,13 @@ resource "kubernetes_cron_job_v1" "backup_job" {
|
||||
volume {
|
||||
name = "backup-storage"
|
||||
host_path {
|
||||
path = "${var.host_storage_path}/${var.app_backup_folder}"
|
||||
path = var.target_folder
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "persistent-storage"
|
||||
host_path {
|
||||
path = "${var.host_storage_path}/${var.app_files_folder}"
|
||||
path = var.source_folder
|
||||
}
|
||||
}
|
||||
volume {
|
||||
|
||||
@@ -37,11 +37,6 @@ variable "cron_schedule" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "host_storage_path" {
|
||||
description = "Host path"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "access_key" {
|
||||
description = "Access key"
|
||||
sensitive = true
|
||||
@@ -59,12 +54,12 @@ variable "app_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "app_files_folder" {
|
||||
variable "source_folder" {
|
||||
description = "Name of host folder"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "app_backup_folder" {
|
||||
variable "target_folder" {
|
||||
description = "Backup source location"
|
||||
type = string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user