Skip to content

Commit 2676716

Browse files
dsa0xSarahFrench
andauthored
Apply suggestions from code review
Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
1 parent 6216d80 commit 2676716

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

internal/plans/plan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ type Plan struct {
171171
FunctionResults []lang.FunctionResultHash
172172

173173
// PolicyResults stores the results of policy evaluations that were performed
174-
// while making this plan.
174+
// while making this plan. These policy results will not be serialized in the plan file.
175175
PolicyResults *PolicyResults
176176
}
177177

internal/terraform/context_apply.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ type ApplyOpts struct {
4949
// the actual root modules.
5050
AllowRootEphemeralOutputs bool
5151

52-
// Locks is a read-only snapshot of provider locks (from the dependency lock
53-
// file).
54-
Locks map[addrs.Provider]*depsfile.ProviderLock
52+
// Locks is a read-only snapshot of provider locks (from the dependency lock
53+
// file). This is required by policy evaluations against providers to access version information.
54+
Locks map[addrs.Provider]*depsfile.ProviderLock
5555

56-
// Optional policy client to enable live policy evaluations.
56+
// Optional policy client.
57+
// When set, policy evaluation logic will be executed in the graph.
58+
// When nil, that logic will be skipped.
5759
PolicyClient policy.Client
5860
PolicyResults *plans.PolicyResults
5961
}

0 commit comments

Comments
 (0)