Skip to content

Conversation

@SarahFrench
Copy link
Member

@SarahFrench SarahFrench commented Dec 2, 2025

Context

The process of how data gets into a planfile created by a plan command is a little convoluted, so here is a diagram attempting to explain how it works. Note that the diagram explains how it works after the changes of this PR, so describes parallel backend- and state store-related fields in places, but broadly the sequence of events is unchanged.

How a planfile gets backend:state_store configuration saved into it

This PR

Follows after #37246, which began implementing use of pluggable state stores with planfiles.

  • Fixes the work from the previous PR: Update data stored in plan files to enable using PSS with saved plans #37246 didn't include storage of the provider's config in the plan file.
  • Allows users to save state store config to a planfile during plan and use that in an apply command:
    • Allow data to enter the plan file during plan: d0f8834
      • The Meta now has a field stateStoreConfigState
      • When Operations are assembled they can set a new PlanOutStateStore field with a description of the state store's config.
      • That new PlanOutStateStore field can be used when writing the plan file

This PR adds some test coverage of the new features in integration tests. There are no E2E tests in this PR and instead the stacked PR #37957 includes an E2E test that shows the full init-plan-apply workflow performed with a pluggable state store.

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

This helps with navigating ambiguity around the word backend. The new name should indicate that the value represents a `backend` block, not a more general interpretation of what a backend is.
…to a lack of data. Don't change it if pluggable state storage is in use.
…ly isn't valid for `stateStoreConfigState` to be nil

I'm about 90% sure that backendConfigState being nil is ok <_<
… file with the expected state_store configuration data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant