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

Method parsePlan

provisioner/terraform/executor.go:402–410  ·  view source on GitHub ↗

parsePlan must only be called while the lock is held.

(ctx, killCtx context.Context, planfilePath string)

Source from the content-addressed store, hash-verified

400
401// parsePlan must only be called while the lock is held.
402func (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.

Callers 2

planMethod · 0.95
GraphMethod · 0.80

Calls 4

execParseJSONMethod · 0.95
basicEnvMethod · 0.95
FuncNameFunction · 0.92
startTraceMethod · 0.45

Tested by

no test coverage detected