ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
30
terraform/internal/vault/argo.tf
Normal file
30
terraform/internal/vault/argo.tf
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
resource "random_password" "versitygw_argo_secret_access_key" {
|
||||
length = 48
|
||||
special = false
|
||||
}
|
||||
|
||||
resource "vault_kv_secret_v2" "versitygw_argo_user" {
|
||||
mount = vault_mount.secret.path
|
||||
name = "versitygw/users/argo"
|
||||
|
||||
data_json_wo_version = 1
|
||||
data_json_wo = jsonencode({
|
||||
secretAccessKey = random_password.versitygw_argo_secret_access_key.result
|
||||
})
|
||||
|
||||
# Vault is source of truth after first write. Re-runs do not rotate user credentials.
|
||||
}
|
||||
|
||||
resource "vault_kv_secret_v2" "argo_artifacts" {
|
||||
mount = vault_mount.secret.path
|
||||
name = "argo/artifacts"
|
||||
|
||||
data_json_wo_version = 1
|
||||
data_json_wo = jsonencode({
|
||||
access_key_id = "********"
|
||||
secret_access_key = random_password.versitygw_argo_secret_access_key.result
|
||||
internal_ca_cert = vault_pki_secret_backend_root_cert.root.certificate
|
||||
})
|
||||
|
||||
# Keep in lockstep with versitygw/users/argo until rotation is designed.
|
||||
}
|
||||
Loading…
Reference in a new issue