Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update how operations use backend config state in context of PSS#37248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
SarahFrench wants to merge13 commits intomain
base:main
Choose a base branch
Loading
frompss/update-how-operations-use-backend-config-state
Draft
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
e5701a9
Implement `ForPlan` method on `StateStoreConfigState`, add `Planner` …
SarahFrenchJun 16, 2025
fd7182a
Rename `ForPlan` method to `Plan`
SarahFrenchJun 16, 2025
ee6e9da
Allow plan files to contain information about state stores
SarahFrenchJun 17, 2025
1bb87e8
Add code needed for representing a state store in the Plan struct, wh…
SarahFrenchJun 17, 2025
9e076d8
Add ability to read/write either a backend or state store's data in a…
SarahFrenchJun 17, 2025
44ce79b
Update plan's `ProviderAddrs` method to include the provider used for…
SarahFrenchJun 17, 2025
a2acc33
Split interfaces
SarahFrenchJun 17, 2025
5255d9d
Merge branch 'main' into pss/store-pss-in-planfile
SarahFrenchJun 18, 2025
2479cdc
WIP
SarahFrenchJun 17, 2025
5b825b2
WIP - allowing apply operation to use plan file content about backend…
SarahFrenchJun 17, 2025
19ede22
Fix - it is valid to not have a backend config in the plan file
SarahFrenchJun 18, 2025
571bffc
Update test following change to BackendForLocalPlan argument
SarahFrenchJun 18, 2025
a5a439f
Fix code consistency issue
SarahFrenchJun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
RenameForPlan method toPlan
  • Loading branch information
@SarahFrench
SarahFrench committedJun 16, 2025
commitfd7182af667565356d1c6e7967a1cad3dad53bd7
2 changes: 1 addition & 1 deletioninternal/command/meta_backend.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -412,7 +412,7 @@ func (m *Meta) Operation(b backend.Backend, vt arguments.ViewType) *backendrun.O
// here first is a bug, so panic.
panic(fmt.Sprintf("invalid workspace: %s", err))
}
planOutBackend, err := m.backendState.ForPlan(schema, workspace)
planOutBackend, err := m.backendState.Plan(schema, workspace)
if err != nil {
// Always indicates an implementation error in practice, because
// errors here indicate invalid encoding of the backend configuration
Expand Down
4 changes: 2 additions & 2 deletionsinternal/command/workdir/backend_config_state.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,13 +61,13 @@ func (s *BackendConfigState) SetConfig(val cty.Value, schema *configschema.Block
return nil
}

//ForPlan produces an alternative representation of the receiver that is
//Plan produces an alternative representation of the receiver that is
// suitable for storing in a plan. The current workspace must additionally
// be provided, to be stored alongside the backend configuration.
//
// The backend configuration schema is required in order to properly
// encode the backend-specific configuration settings.
func (s *BackendConfigState)ForPlan(schema *configschema.Block, workspaceName string) (*plans.Backend, error) {
func (s *BackendConfigState)Plan(schema *configschema.Block, workspaceName string) (*plans.Backend, error) {
if s == nil {
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletioninternal/command/workdir/config_state.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,5 +17,5 @@ type ConfigState[T any] interface {
}

type Planner[T any] interface {
ForPlan(*configschema.Block, string) (*T, error)
Plan(*configschema.Block, string) (*T, error)
}
4 changes: 2 additions & 2 deletionsinternal/command/workdir/statestore_config_state.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,13 +95,13 @@ func (s *StateStoreConfigState) SetConfig(val cty.Value, schema *configschema.Bl
return nil
}

//ForPlan produces an alternative representation of the receiver that is
//Plan produces an alternative representation of the receiver that is
// suitable for storing in a plan. The current workspace must additionally
// be provided, to be stored alongside the state store configuration.
//
// The state_store configuration schema is required in order to properly
// encode the state store-specific configuration settings.
func (s *StateStoreConfigState)ForPlan(schema *configschema.Block, workspaceName string) (*plans.StateStore, error) {
func (s *StateStoreConfigState)Plan(schema *configschema.Block, workspaceName string) (*plans.StateStore, error) {
if s == nil {
return nil, nil
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp