2021-12-08 09:24:09 +07:00
|
|
|
resource "b2_bucket" "backup" {
|
2021-12-11 23:49:53 +07:00
|
|
|
bucket_name = "khuedoan-homelab-backup"
|
2021-12-08 09:24:09 +07:00
|
|
|
bucket_type = "allPrivate"
|
|
|
|
}
|
2021-12-25 20:18:45 +07:00
|
|
|
|
2021-12-25 21:58:02 +07:00
|
|
|
resource "random_password" "backup_repo_password" {
|
|
|
|
length = 64
|
|
|
|
special = false
|
|
|
|
}
|
|
|
|
|
2021-12-25 20:18:45 +07:00
|
|
|
resource "kubernetes_secret" "backblaze_credentials" {
|
|
|
|
metadata {
|
|
|
|
name = "backblaze-credentials"
|
|
|
|
namespace = "k8up-operator"
|
|
|
|
}
|
|
|
|
|
|
|
|
data = {
|
|
|
|
"application-key-id" = var.b2_application_key_id
|
|
|
|
"application-key" = var.b2_application_key
|
2021-12-25 21:58:02 +07:00
|
|
|
"repo-password" = random_password.backup_repo_password.result
|
2021-12-25 20:18:45 +07:00
|
|
|
}
|
|
|
|
}
|