설명
purge_protection_enabled = true를 설정하면 보존 기간 동안 일시 삭제된 키, 비밀, 인증서를 복구할 수 있습니다. 최초 삭제로 인한 서비스 중단은 여전히 발생할 수 있습니다.
잠재적 영향
암호화 키가 영구 삭제되면 새 키를 만들어도 기존 데이터를 복호화하지 못할 수 있습니다.
해결 방법
제거 보호는 한 번 켜면 해제할 수 없습니다. Vault 생성 시 복구에 필요한 보존 기간(7~90일)을 정하세요. 이후에는 변경할 수 없습니다. 삭제 권한과 백업을 점검하고 기간 안에 복구할 수 있는지 시험하세요.
예시
두 예시는 보존 기간이 7일인 같은 Vault를 사용합니다. 제거 보호가 꺼져 있으면 제거 권한이 있는 사용자가 이 기간 중에도 영구 삭제할 수 있습니다.
변경 전
hcl
resource "azurerm_key_vault" "app_key_vault" {
name = "examplekeyvault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "standard"
soft_delete_retention_days = 7
purge_protection_enabled = false
}
변경 후
hcl
resource "azurerm_key_vault" "app_key_vault" {
name = "examplekeyvault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "standard"
soft_delete_retention_days = 7
purge_protection_enabled = true
}