MCPcopy Index your code
hub / github.com/coder/coder / planModules

Function planModules

provisioner/terraform/planresources.go:14–29  ·  view source on GitHub ↗
(plan *tfjson.Plan)

Source from the content-addressed store, hash-verified

12}
13
14func planModules(plan *tfjson.Plan) []*tfjson.StateModule {
15 modules := []*tfjson.StateModule{}
16 if plan.PriorState != nil {
17 // We need the data resources for rich parameters. For some reason, they
18 // only show up in the PriorState.
19 //
20 // We don't want all prior resources, because Quotas (and
21 // future features) would never know which resources are getting
22 // deleted by a stop.
23
24 filtered := onlyDataResources(*plan.PriorState.Values.RootModule)
25 modules = append(modules, &filtered)
26 }
27 modules = append(modules, plan.PlannedValues.RootModule)
28 return modules
29}
30
31// ConvertPlanState consumes a terraform plan json output and produces a thinner
32// version of `State` to be used before `terraform apply`. `ConvertState`

Callers 2

GraphMethod · 0.85
ConvertPlanStateFunction · 0.85

Calls 1

onlyDataResourcesFunction · 0.85

Tested by

no test coverage detected