Skip to content

Commit

Permalink
renamed statePath to stackPath
Browse files Browse the repository at this point in the history
  • Loading branch information
psihachina committed Sep 28, 2022
1 parent 6487177 commit 32be2ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/commands/tfenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,17 @@ func GenerateTerraformFiles(name string, terraformStateBucketName string, projec
NAMESPACE: project.Namespace,
}

statePath := filepath.Join(project.EnvDir, name)
stackPath := filepath.Join(project.EnvDir, name)
if name == "infra" {
statePath = project.EnvDir
stackPath = project.EnvDir
}

logrus.Debugf("backend opts: %s", backendOpts)
logrus.Debugf("state dir path: %s", statePath)
logrus.Debugf("state dir path: %s", stackPath)

err := template.GenerateBackendTf(
backendOpts,
statePath,
stackPath,
)
if err != nil {
pterm.Error.Printfln("Generate terraform file for \"%s\" not completed", name)
Expand Down Expand Up @@ -164,11 +164,11 @@ func GenerateTerraformFiles(name string, terraformStateBucketName string, projec
}

logrus.Debugf("backend opts: %s", varsOpts)
logrus.Debugf("state dir path: %s", statePath)
logrus.Debugf("state dir path: %s", stackPath)

err = template.GenerateVarsTf(
varsOpts,
statePath,
stackPath,
)
if err != nil {
pterm.Error.Printfln("Generate terraform file for \"%s\" not completed", name)
Expand Down

0 comments on commit 32be2ee

Please sign in to comment.