⚙️ JSONNET RUNE DIFFICULTY: Apprentice Structural

The Facade of Jsonnet

A simplified interface to a complex configuration subsystem.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Illusion // Veil of Simplicity
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// JSONNET PATTERN //
local ComplexNetwork = { ... };
local ComplexCompute = { ... };
local ComplexStorage = { ... };

local EasyDeployFacade(name, size) = {
  network: { vpc: "default" },
  compute: { instances: if size == "large" then 10 else 1 },
  storage: { volume_gb: if size == "large" then 1000 else 10 },
  app_name: name
};

{
  myApp: EasyDeployFacade("ArcaneService", "small")
}

The Facade hides the labyrinth of complex system parameters behind a simple function, providing an intuitive sigil to cast deployment spells.

Runic Tags: #structural #facade #jsonnet