feat: hint the resources layout for narrowed exports - #35
Merged
Conversation
Print one hint after a written export when the user passes --resources or --name and the effective layout is workspace. The hint uses the existing progress channel, so --quiet and --json suppress it. Document the --resources and --module-layout pairing in resource selection. Add CHANGELOG.md for every published tag and an Unreleased section.
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.
Export hint
exportprints one hint line after it writes the export:Conditions for the hint:
--resourcesor--name.--module-layoutisworkspace.The hint uses the existing
rc.progress()stderr channel, so--quietand--jsonsuppress it.needsLayoutHintholds the condition.Documentation
docs/resource-selection.mdgains a "Selection and module layout" section. It states that--resourcesand--namechoose the objects, that--module-layoutchooses the modules and theTerraform addresses, and that a narrower selection does not change the layout. It includes the
--resources catalogs --module-layout resources --scaffoldexample and links todocs/module-layouts.md.Changelog
CHANGELOG.mdis new. It uses the Keep a Changelog format and covers v0.1.0 through v0.5.0 fromthe merged pull requests in each tag range, plus an
Unreleasedsection for this change.CONTRIBUTING.mdgains one sentence that asks contributors to add anUnreleasedentry with eachpull request.
Tests
TestExportHintsResourceLayoutininternal/cli/export_test.gois table-driven. It covers--resources,--name, the default groups,--module-layout resources, and--quiet. The twopositive cases failed before the change.
make checkpasses.Intended for release v0.5.1. This pull request creates no tag and no release.