From 2c079259818e9bab43156b4c9dc083336c66ccdb Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 5 Oct 2026 07:03:18 +0000 Subject: [PATCH] Allow pipeline group run-as with Terraform --- bundle/deploy/terraform/tfdyn/convert_pipeline.go | 5 ----- .../terraform/tfdyn/convert_pipeline_test.go | 15 --------------- 2 files changed, 20 deletions(-) diff --git a/bundle/deploy/terraform/tfdyn/convert_pipeline.go b/bundle/deploy/terraform/tfdyn/convert_pipeline.go index 39b0ad9f5a9..2eacbf714af 100644 --- a/bundle/deploy/terraform/tfdyn/convert_pipeline.go +++ b/bundle/deploy/terraform/tfdyn/convert_pipeline.go @@ -2,7 +2,6 @@ package tfdyn import ( "context" - "errors" "fmt" "github.com/databricks/cli/bundle/internal/tf/schema" @@ -12,10 +11,6 @@ import ( ) func convertPipelineResource(ctx context.Context, vin dyn.Value) (dyn.Value, error) { - if vin.Get("run_as").Get("group_name").Kind() != dyn.KindInvalid { - return dyn.InvalidValue, errors.New("run_as.group_name for pipelines is not supported with the terraform engine; use the direct engine") - } - // Modify top-level keys. vout, err := renameKeys(vin, map[string]string{ "libraries": "library", diff --git a/bundle/deploy/terraform/tfdyn/convert_pipeline_test.go b/bundle/deploy/terraform/tfdyn/convert_pipeline_test.go index d8631155fc0..fe6620a00c2 100644 --- a/bundle/deploy/terraform/tfdyn/convert_pipeline_test.go +++ b/bundle/deploy/terraform/tfdyn/convert_pipeline_test.go @@ -138,18 +138,3 @@ func TestConvertPipeline(t *testing.T) { }, }, out.Permissions["pipeline_my_pipeline"]) } - -func TestConvertPipelineGroupRunAs(t *testing.T) { - for _, group := range []string{"group", ""} { - t.Run(group, func(t *testing.T) { - vin := dyn.V(map[string]dyn.Value{ - "name": dyn.V("my pipeline"), - "run_as": dyn.V(map[string]dyn.Value{"group_name": dyn.V(group)}), - }) - out := schema.NewResources() - err := pipelineConverter{}.Convert(t.Context(), "my_pipeline", vin, out) - require.EqualError(t, err, "run_as.group_name for pipelines is not supported with the terraform engine; use the direct engine") - assert.Empty(t, out.Pipeline) - }) - } -}