(plan *tfjson.Plan)
| 12 | } |
| 13 | |
| 14 | func 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` |
no test coverage detected