You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tfexec doesn't support a workspace-based environment, and I want support it.
Use Case(s)
I want to run Plan and Apply in a workspace environment. I have confirmed that the following code does not currently work.
package main
import (
"context"
"fmt"
"github.com/hashicorp/terraform-exec/tfexec"
)
func main() {
var dst = "/Users/takuro.saito/work/core-infra/terraform/aws/tools/slack-command/"
var ctx context.Context
ctx = context.Background()
tf, err := tfexec.NewTerraform(dst, "")
if err != nil {
panic(err)
}
fmt.Println("init")
err = tf.Init(ctx)
if err != nil {
panic(err)
}
}
❯ go run main.go
init
panic:
Error: Failed to select workspace: input not a valid number
goroutine 1 [running]:
main.main()
/var/tmp/path/to/main.go:23 +0x133
exit status 2
The text was updated successfully, but these errors were encountered:
Feature Description
tfexec doesn't support a workspace-based environment, and I want support it.
Use Case(s)
I want to run Plan and Apply in a workspace environment. I have confirmed that the following code does not currently work.
The text was updated successfully, but these errors were encountered: