You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #874, we introduced links from the module source to the documentation for registry modules. We use the module source and the module version to build the URL.
When someone uses different versions of the same module, the only latest module call will be stored and used to build the link.
This problem occurs because of the way we generate dependency keys for dependent schemas. The current approach only uses the source as an identifier and ignores the version.
Taking the version into account will provide better autocompletion and link to the correct version of the module when accessing the documentation.
Challenges
A module version can contain version-constraints (e.g. >= 3.0.0, < 3.14.0) which first need to be resolved to a version before they can be matched
A module version can be omitted, so the latest version is assumed
If version becomes a dependency key in the schema it will lead to unintended effects, like another link inside the body
Proposal
hcl-lang
Add a new field to AttributeSchema to mark an attribute as linkable
terraform-schema
Extend SchemaForModule to take the module version into account when building schemas for dependent module blocks
Mark the version attribute for module blocks as dependency key
Mark the source attribute for module blocks as linkable
TODO?
The text was updated successfully, but these errors were encountered:
Background
In #874, we introduced links from the module source to the documentation for registry modules. We use the module source and the module version to build the URL.
When someone uses different versions of the same module, the only latest module call will be stored and used to build the link.
This problem occurs because of the way we generate dependency keys for dependent schemas. The current approach only uses the
source
as an identifier and ignores the version.Taking the version into account will provide better autocompletion and link to the correct version of the module when accessing the documentation.
Challenges
>= 3.0.0, < 3.14.0
) which first need to be resolved to a version before they can be matchedversion
becomes a dependency key in the schema it will lead to unintended effects, like another link inside the bodyProposal
hcl-lang
AttributeSchema
to mark an attribute as linkableterraform-schema
SchemaForModule
to take the module version into account when building schemas for dependent module blocksversion
attribute for module blocks as dependency keysource
attribute for module blocks as linkableTODO?
The text was updated successfully, but these errors were encountered: