setup gcs backup bucket for longhorn
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
resource "random_password" "tofu" {
|
||||
length = 32
|
||||
length = 32
|
||||
}
|
||||
resource "gitea_user" "tofu" {
|
||||
username = "tofu_module_reader"
|
||||
@@ -8,24 +8,24 @@ resource "gitea_user" "tofu" {
|
||||
password = random_password.tofu.result
|
||||
email = "tofu-module-reader@arcodange.fake"
|
||||
must_change_password = false
|
||||
full_name = "restricted CI user"
|
||||
prohibit_login = false
|
||||
restricted = true
|
||||
visibility = "private"
|
||||
full_name = "restricted CI user"
|
||||
prohibit_login = false
|
||||
restricted = true
|
||||
visibility = "private"
|
||||
}
|
||||
resource "tls_private_key" "tofu" {
|
||||
algorithm = "ED25519"
|
||||
algorithm = "ED25519"
|
||||
}
|
||||
resource "gitea_public_key" "tofu" {
|
||||
title = "tofu"
|
||||
key = tls_private_key.tofu.public_key_openssh
|
||||
username = gitea_user.tofu.username
|
||||
title = "tofu"
|
||||
key = tls_private_key.tofu.public_key_openssh
|
||||
username = gitea_user.tofu.username
|
||||
}
|
||||
|
||||
resource "vault_kv_secret" "gitea_admin_token" {
|
||||
path = "kvv1/gitea/tofu_module_reader"
|
||||
data_json = jsonencode({
|
||||
ssh_private_key = tls_private_key.tofu.private_key_openssh
|
||||
ssh_public_key = tls_private_key.tofu.public_key_openssh
|
||||
ssh_public_key = tls_private_key.tofu.public_key_openssh
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user