command/init: Merge duplicated PSS logic back into existing codepath#38227
Merged
radeksimko merged 8 commits intomainfrom Mar 4, 2026
Merged
command/init: Merge duplicated PSS logic back into existing codepath#38227radeksimko merged 8 commits intomainfrom
radeksimko merged 8 commits intomainfrom
Conversation
69523f9 to
8e08ab3
Compare
4721df5 to
d70deca
Compare
3 tasks
2e7ed4f to
a1b6680
Compare
This enables us to present most of the useful diagnostics relating to the backend block together with other configuration errors, rather than making the user do two cycles. Consequently this alings with existing tests which would otherwise fail (or need to be amended) if we didn't do this.
a1b6680 to
3b060b7
Compare
…message message code
79857a5 to
6f2622a
Compare
This was referenced Mar 4, 2026
SarahFrench
reviewed
Mar 9, 2026
| "reusing_version_during_state_provider_init": { | ||
| HumanValue: "- Reusing previous version of %s", | ||
| JSONValue: "%s: Reusing previous version of %s", | ||
| JSONValue: "Reusing previous version of %s", |
Member
There was a problem hiding this comment.
I don't think there's a negative impact of removing this %s as it's a new log, but the structure of the JSONValue was based on reusing_previous_version_info above, where the provider name is a prefix to the message.
SarahFrench
added a commit
that referenced
this pull request
Mar 12, 2026
This was referenced Mar 12, 2026
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.
Context
Back in July we "forked" some internal
initcommand logic to have a safer space to experiment without impacting any user unaware of the experiment.The experiment is not concluded yet nor even ready for early adopters yet but the code structure is mostly settled and could benefit from being merged back into the main codepath, while keeping the experimental codepaths still gated behind a CLI flag and alpha releases.
More details to enable public experimentation will be published in due course.
Review Notes
As usual in my PRs, commit log should serve as your friend - i.e. I took the time to logically separate parts of the large PRs to make it easier to review.
In the process of merging I found a few bugs and discrepancies through existing tests which started failing after the merge.
Order of Operations
Order of operations during
initis changing here in that provider installation was split in two phases - installing from configuration and installing from state.Previous order:
New order:
End-user Impact
As mentioned in the changelog entry, this should not impact the end user aside from the output from
init. The same operations still happen duringinit, just at different times.We are introducing 3 new log messages which are replacing an existing one in line with the above.
Old message example
JSON
{ "@level": "info", "@message": "Initializing provider plugins...", "@module": "terraform.ui", "message_code": "initializing_provider_plugin_message", "type": "init_output" }Human
New message examples
JSON
{ "@level": "info", "@message": "Initializing provider plugins found in the configuration...", "@module": "terraform.ui", "message_code": "initializing_provider_plugin_from_config_message", "type": "init_output" }{ "@level": "info", "@message": "Initializing provider plugins found in the state...", "@module": "terraform.ui", "message_code": "initializing_provider_plugin_from_state_message", "type": "init_output" }{ "@level": "info", "@message": "Reusing previous version of hashicorp/local", "@module": "terraform.ui", "message_code": "reusing_version_during_state_provider_init", "type": "init_output" }Human
Target Release
1.15.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry