diff --git a/pkg/up/prune.go b/pkg/up/prune.go index 0ee52c07..27314b78 100644 --- a/pkg/up/prune.go +++ b/pkg/up/prune.go @@ -10,7 +10,7 @@ import ( func (ctx *Context) Prune() error { if ctx.Cloud { - return nil + return ctx.pruneCloud() } utils.Highlight("\nCleaning up unneeded resources...\n\n") @@ -42,6 +42,18 @@ func (ctx *Context) Prune() error { return git.Sync(repoRoot, "Post-setup resource cleanup", true) } +func (ctx *Context) pruneCloud() error { + utils.Highlight("\nCleaning up unneeded resources...\n\n") + repoRoot, err := git.Root() + if err != nil { + return err + } + + _ = os.RemoveAll("./terraform/apps") + + return git.Sync(repoRoot, "Post-setup resource cleanup", true) +} + func stateRm(dir, field string) error { cmd := exec.Command("terraform", "state", "rm", field) cmd.Dir = dir