diff --git a/cmd/cloud/deploy.go b/cmd/cloud/deploy.go index 15010c31f..12b6b5364 100644 --- a/cmd/cloud/deploy.go +++ b/cmd/cloud/deploy.go @@ -2,6 +2,7 @@ package cloud import ( "fmt" + "strings" cloud "github.com/astronomer/astro-cli/cloud/deploy" "github.com/astronomer/astro-cli/cmd/utils" @@ -92,7 +93,7 @@ func deploy(cmd *cobra.Command, args []string) error { deploymentID = args[0] } - if deploymentID == "" || forcePrompt || workspaceID == "" { + if (!strings.HasPrefix(deploymentID, "vr-")) && (deploymentID == "" || forcePrompt || workspaceID == "") { var err error workspaceID, err = coalesceWorkspace() if err != nil { diff --git a/cmd/cloud/deploy_test.go b/cmd/cloud/deploy_test.go index 53522572b..d94a4a1af 100644 --- a/cmd/cloud/deploy_test.go +++ b/cmd/cloud/deploy_test.go @@ -57,4 +57,7 @@ func TestDeployImage(t *testing.T) { err = execDeployCmd([]string{"-f", "test-deployment-id", "--dags", "--parse", "--pytest"}...) assert.NoError(t, err) + + err = execDeployCmd([]string{"vr-Id"}...) + assert.NoError(t, err) }