From f55a172aed8cedc21d4063c0c807f2e2f9128635 Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Sun, 30 Jun 2024 21:07:29 +0200 Subject: [PATCH] Fix filename output when backend didn't exist yet --- pkg/scaffold/tf.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/scaffold/tf.go b/pkg/scaffold/tf.go index 28957e4..324f68d 100644 --- a/pkg/scaffold/tf.go +++ b/pkg/scaffold/tf.go @@ -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)