Skip to content

feat(datastore/redis): logical flavour#360

Merged
anshulsao merged 2 commits into
mainfrom
feat/redis-reference-flavour
Jun 22, 2026
Merged

feat(datastore/redis): logical flavour#360
anshulsao merged 2 commits into
mainfrom
feat/redis-reference-flavour

Conversation

@anshulsao

@anshulsao anshulsao commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new logical flavour for the datastore/redis intent: a logical redis datastore hosted on an existing/shared physical instance. It creates no cloud resources and requires no providers.

It re-exposes the @facets/redis outputs of an existing redis datastore — selected via the source spec field (x-ui-output-type: @facets/redis, so it resolves to the selected resource's full outputs and is per-env override-able). An optional db_index (0–15, default 0) targets a distinct logical Redis DB on the shared physical instance and is reflected into the emitted connection_string.

Use case: staging consolidation — a logical cache pointing at a shared physical instance / DB index.

Note: named logical (not reference) to avoid clashing with Facets' cross-blueprint reference concept.

What it does

  • intent: redis, flavor: logical, output type @facets/redis (same contract the existing flavours emit: interfaces.cluster with endpoint/connection_string/auth_token/port/secrets).
  • main.tf declares no resources; inputs: {} (no provider-requiring inputs).
  • outputs.tf re-emits the redis interface as a pure passthrough from var.instance.spec.source.interfaces.cluster, using lookup() for optionals; connection_string gets /<db_index> appended.

Validation

  • terraform fmt
  • terraform init -backend=false
  • terraform validate ✓ (Success! The configuration is valid.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5

anshulsao and others added 2 commits June 22, 2026 11:36
…ting redis datastore's outputs (no resources)

Adds modules/datastore/redis/reference/1.0, a reference (passthrough)
flavour for the redis intent. It provisions no cloud resource and requires
no providers; it re-exposes the @facets/redis outputs of an existing redis
datastore (resolved into var.instance.spec.source via the
`x-ui-output-type: @facets/redis` spec field) as a separate logical
resource. An optional db_index targets a distinct logical Redis DB on a
shared physical instance and is reflected into the emitted connection_string.

Use case: staging consolidation — a logical cache pointing at a shared
physical instance/db-index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5
"reference" clashes with Facets' cross-blueprint reference concept.
"logical" better describes the use case: a logical redis datastore
hosted on a shared/existing physical instance (optional db_index),
re-exposing its connection outputs with no resources created.

Renames modules/datastore/redis/reference -> .../logical and updates
the flavor field, titles, and descriptions accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5
@anshulsao anshulsao changed the title feat(datastore/redis): reference flavour feat(datastore/redis): logical flavour Jun 22, 2026
@anshulsao
anshulsao merged commit 5ce366e into main Jun 22, 2026
@anshulsao
anshulsao deleted the feat/redis-reference-flavour branch June 22, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant