Skip to content

Commit

Permalink
Fix filename output when backend didn't exist yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Jun 30, 2024
1 parent e589741 commit f55a172
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/scaffold/tf.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func writeBackendConfig(ctx context.Context, dir fs.FS, stdin io.Reader) (reterr
_ = outFile.Close()
}()
} else {
filename = "backend.tf"
file = hclwrite.NewEmptyFile()
tfBlock := file.Body().AppendNewBlock("terraform", nil)
backendBlock = tfBlock.Body().AppendNewBlock("backend", nil)
Expand Down

0 comments on commit f55a172

Please sign in to comment.