feat(datastore/mysql): logical flavour#359
Merged
Merged
Conversation
…ting mysql datastore's outputs (no resources) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5
'reference' clashed with Facets' cross-blueprint reference concept. 'logical' = a logical database hosted on a shared physical instance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new logical flavour for the datastore/mysql intent:
modules/datastore/mysql/logical/1.0.A logical database hosted on an existing/shared MySQL instance — it re-exposes the source instance's connection outputs and creates no cloud resources and requires no providers.
Use case: staging database consolidation — several logical databases sharing one physical MySQL instance.
How
spec.sourceusesx-ui-output-type: '@facets/mysql', resolving to the SELECTED resource's FULL outputs (attributes + interfaces) intovar.instance.spec.source. This is per-environment override-able, so each env can point the logical DB at a different physical instance.spec.database_name(optional) names the logical DB to expose; when set, the re-emittedconnection_stringis rebuilt asmysql://<host>:<port>/<database_name>.main.tfdeclares NO resources (pure passthrough).outputs.tfre-emits the@facets/mysqlcontract (reader/writer host/port/username/password/database/connection_string/secrets) + attributes fromvar.instance.spec.source, usinglookup()for optionals.@facets/mysql.Validation
terraform fmt+terraform init -backend=false+terraform validate→ Success! The configuration is valid.🤖 Generated with Claude Code
https://claude.ai/code/session_01PKZUrLtUbJS5GuEyRA8Vd5