refactor: 구조 변경

This commit is contained in:
donghyeon-ka
2026-08-28 17:24:26 +09:00
parent a6f6c663e0
commit b8626946b1
192 changed files with 2251 additions and 206 deletions
@@ -0,0 +1,15 @@
# Vault policy set
## 책임
이름과 HCL 문서 map을 Vault ACL policy로 만드는 backend 없는 재사용
Terraform component입니다.
## 입력과 출력
- 입력: policy 이름별 HCL 문서
- 출력: 요청 이름별 생성된 Vault policy 이름
- 민감 payload: 없음
Policy 문서는 이를 소비하는 live root가 소유하며, 이 component는 API 객체
생성만 캡슐화합니다.
@@ -0,0 +1,11 @@
resource "vault_policy" "this" {
for_each = var.policies
name = each.key
policy = each.value
}
output "names" {
description = "Policy names keyed by their requested names."
value = { for name, policy in vault_policy.this : name => policy.name }
}
@@ -0,0 +1,4 @@
variable "policies" {
description = "Map of Vault policy names to HCL policy documents."
type = map(string)
}
@@ -0,0 +1,10 @@
terraform {
required_version = ">= 1.11.0"
required_providers {
vault = {
source = "hashicorp/vault"
version = "~> 5.7.0"
}
}
}