Skip to content

Commit d451167

Browse files
authored
fix: TFE remote ops detection for >= tf 1.0.0 (#1687)
1 parent d502bed commit d451167

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server/core/runtime/plan_step_runner.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (p *PlanStepRunner) isRemoteOpsErr(output string, err error) bool {
6363
if err == nil {
6464
return false
6565
}
66-
return strings.Contains(output, remoteOpsErr01114) || strings.Contains(output, remoteOpsErr012)
66+
return strings.Contains(output, remoteOpsErr01114) || strings.Contains(output, remoteOpsErr012) || strings.Contains(output, remoteOpsErr100)
6767
}
6868

6969
// remotePlan runs a terraform plan command compatible with TFE remote
@@ -332,6 +332,14 @@ locally at this time.
332332
333333
`
334334

335+
// remoteOpsErr100 is the error terraform plan will retrun if this project is
336+
// using TFE remote operations in TF 1.0.{0,1}.
337+
var remoteOpsErr100 = `Error: Saving a generated plan is currently not supported
338+
339+
The "remote" backend does not support saving the generated execution plan
340+
locally at this time.
341+
`
342+
335343
// remoteOpsHeader is the header we add to the planfile if this plan was
336344
// generated using TFE remote operations.
337345
var remoteOpsHeader = "Atlantis: this plan was created by remote ops\n"

0 commit comments

Comments
 (0)