Design note 3: Add Azure Cache for Redis¶
▸ DECISION
Add azurerm_redis_cache (Microsoft.Cache/Redis) to the v0.2 resource
roster. azemu serves the ARM management plane; the data plane is delegated to
a standard redis sidecar in docker-compose.yml, mirroring the Azurite
pattern from design note 1.
- azemu serves
Microsoft.Cache/RedisCRUD,POST .../listKeys, capacity and family validation, and the SKU shape the azurerm provider expects. listKeysreturns deterministic dev keys; the sidecar is configured with--requirepassmatching the primary key so auth round-trips work in tests.hostNamein ARM responses points at the redis sidecar (azemu-redisinside Docker,localhost:6379for host callers).docker-compose.ymladds an optionalredisservice via compose profiles; default users see no change.
Consequences¶
Positive¶
- The multi-replica scenario in design note 2 becomes fully expressible without extra infrastructure beyond what compose already orchestrates.
- The pattern generalises: future "real backend" data-plane work follows the same recipe.
azurerm_redis_cacheround-trips a realterraform applyagainst unmodifiedazurerm, adding one more "Full" entry to PARITY.md.
Negative¶
- One more optional container in compose. Mitigated by compose profiles so default users see no change.
listKeysdev keys must match the sidecar's--requirepass. Documented in setup.- Premium-tier shapes (clustering, geo-replication, persistence) are tracked as follow-ups. The v0.2 row reads "Standard tier only."
Neutral¶
- Redis client library choice is left to the contributor (go-redis, ioredis, redis-py).
- Existing v0.1 and v0.2 functionality is unchanged.
Open questions¶
- Premium tier features. Initial scope is Standard-only; Premium-tier clustering is a tracked follow-up.
- TLS port 6380. The first implementation may default to non-TLS for simplicity. Stunnel opt-in documented as a follow-up.