documentation and fmt
This commit is contained in:
@@ -2,8 +2,8 @@ resource "vault_auth_backend" "kubernetes" {
|
||||
type = "kubernetes"
|
||||
}
|
||||
resource "vault_kubernetes_auth_backend_config" "config" {
|
||||
backend = vault_auth_backend.kubernetes.path
|
||||
kubernetes_host = "https://kubernetes.default.svc:443"
|
||||
backend = vault_auth_backend.kubernetes.path
|
||||
kubernetes_host = "https://kubernetes.default.svc:443"
|
||||
}
|
||||
|
||||
resource "vault_mount" "kvv2" {
|
||||
@@ -29,18 +29,18 @@ resource "vault_database_secret_backend_connection" "postgres" {
|
||||
|
||||
postgresql {
|
||||
connection_url = "postgresql://{{username}}:{{password}}@pgbouncer.tools:5432/postgres?sslmode=disable"
|
||||
username = var.POSTGRES_CREDENTIALS_EDITOR_USERNAME
|
||||
password = var.POSTGRES_CREDENTIALS_EDITOR_PASSWORD
|
||||
username = var.POSTGRES_CREDENTIALS_EDITOR_USERNAME
|
||||
password = var.POSTGRES_CREDENTIALS_EDITOR_PASSWORD
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resource "vault_mount" "transit" {
|
||||
path = "transit"
|
||||
type = "transit"
|
||||
description = "Pour le vault secret operator (vso) dans k3s en cas de redemarrage par exemple"
|
||||
# default_lease_ttl_seconds = 3600
|
||||
# max_lease_ttl_seconds = 86400
|
||||
path = "transit"
|
||||
type = "transit"
|
||||
description = "Pour le vault secret operator (vso) dans k3s en cas de redemarrage par exemple"
|
||||
# default_lease_ttl_seconds = 3600
|
||||
# max_lease_ttl_seconds = 86400
|
||||
}
|
||||
resource "vault_transit_secret_backend_key" "vso_client_cache" {
|
||||
backend = vault_mount.transit.path
|
||||
@@ -49,17 +49,17 @@ resource "vault_transit_secret_backend_key" "vso_client_cache" {
|
||||
|
||||
data "vault_policy_document" "vso_client_cache" {
|
||||
rule {
|
||||
path = "${vault_mount.transit.path}/encrypt/${vault_transit_secret_backend_key.vso_client_cache.name}"
|
||||
path = "${vault_mount.transit.path}/encrypt/${vault_transit_secret_backend_key.vso_client_cache.name}"
|
||||
capabilities = ["create", "update"]
|
||||
}
|
||||
rule {
|
||||
path = "${vault_mount.transit.path}/decrypt/${vault_transit_secret_backend_key.vso_client_cache.name}"
|
||||
path = "${vault_mount.transit.path}/decrypt/${vault_transit_secret_backend_key.vso_client_cache.name}"
|
||||
capabilities = ["create", "update"]
|
||||
}
|
||||
}
|
||||
resource "vault_policy" "vso_client_cache" {
|
||||
name = "edit-vso-client-cache"
|
||||
policy = data.vault_policy_document.vso_client_cache.hcl
|
||||
name = "edit-vso-client-cache"
|
||||
policy = data.vault_policy_document.vso_client_cache.hcl
|
||||
}
|
||||
|
||||
resource "vault_kubernetes_auth_backend_role" "vso" {
|
||||
@@ -75,8 +75,8 @@ resource "vault_kubernetes_auth_backend_role" "vso" {
|
||||
}
|
||||
|
||||
module "app_policies" {
|
||||
source = "./modules/app_policy"
|
||||
for_each = var.applications
|
||||
name = each.value
|
||||
source = "./modules/app_policy"
|
||||
for_each = var.applications
|
||||
name = each.value
|
||||
gitea_app_id = var.gitea_app_id
|
||||
}
|
||||
Reference in New Issue
Block a user