parsePlan must only be called while the lock is held.
(ctx, killCtx context.Context, planfilePath string)
| 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) { |
| 403 | ctx, span := e.server.startTrace(ctx, tracing.FuncName()) |
| 404 | defer span.End() |
| 405 | |
| 406 | args := []string{"show", "-json", "-no-color", planfilePath} |
| 407 | p := new(tfjson.Plan) |
| 408 | err := e.execParseJSON(ctx, killCtx, args, e.basicEnv(), p) |
| 409 | return p, err |
| 410 | } |
| 411 | |
| 412 | // logDrift must only be called while the lock is held. |
| 413 | // It will log the output of `terraform show`, which will show which resources have drifted from the known state. |
no test coverage detected