(sm tfjson.StateModule)
| 382 | } |
| 383 | |
| 384 | func onlyDataResources(sm tfjson.StateModule) tfjson.StateModule { |
| 385 | filtered := sm |
| 386 | filtered.Resources = []*tfjson.StateResource{} |
| 387 | for _, r := range sm.Resources { |
| 388 | if r.Mode == "data" { |
| 389 | filtered.Resources = append(filtered.Resources, r) |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | filtered.ChildModules = []*tfjson.StateModule{} |
| 394 | for _, c := range sm.ChildModules { |
| 395 | filteredChild := onlyDataResources(*c) |
| 396 | filtered.ChildModules = append(filtered.ChildModules, &filteredChild) |
| 397 | } |
| 398 | return filtered |
| 399 | } |
| 400 | |
| 401 | // parsePlan must only be called while the lock is held. |
| 402 | func (e *executor) parsePlan(ctx, killCtx context.Context, planfilePath string) (*tfjson.Plan, error) { |
no outgoing calls