terraform-vault-tenant/approle_auth.tf
Bertrand Lanson 47f53a2a20
All checks were successful
development / Check commit compliance (push) Successful in 4s
pull-requests-open / Check commit compliance (pull_request) Successful in 5s
fix: remove duplicate resource
2024-05-26 16:24:57 +02:00

24 lines
537 B
HCL

resource "vault_auth_backend" "approle" {
type = "approle"
path = "${var.tenant_prefix}-approle"
tune {
default_lease_ttl = "3600s"
max_lease_ttl = "14400s"
}
}
resource "vault_identity_group" "this" {
name = var.tenant_name
type = "internal"
metadata = {
tenant = var.tenant_name
prefix = var.tenant_prefix
}
}
resource "vault_identity_group_alias" "this" {
name = var.tenant_name
mount_accessor = vault_auth_backend.approle.accessor
canonical_id = vault_identity_group.this.id
}