From fc61fb59d52312a24280f39f933bc1df047d8025 Mon Sep 17 00:00:00 2001 From: Brandon Pollack Date: Wed, 29 Jan 2025 10:40:54 +0100 Subject: [PATCH] Re-enabling compact. It works in local tests and is required for top modules to convert --- pkg/convert/tf.go | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/pkg/convert/tf.go b/pkg/convert/tf.go index 44a5141..61f4917 100644 --- a/pkg/convert/tf.go +++ b/pkg/convert/tf.go @@ -487,21 +487,11 @@ var tfFunctionStd = map[string]struct { output: "result", paramArgs: true, }, - /* Currently failing due to: cannot assign expression of type { input: (string, string, string, null, - string) } to location of type { input: list(output(string) | string) | output(list(string)) } | output({ - input: list(string) }): - */ - // - // on main.pp line 263: - // 264: value = invoke("std:index:compact", { - // 265: input = ["a", "", "b", null, "c"] - // 266: }).result - // - //"compact": { - // token: "std:index:compact", - // inputs: []string{"input"}, - // output: "result", - //}, + "compact": { + token: "std:index:compact", + inputs: []string{"input"}, + output: "result", + }, "cidrhost": { token: "std:index:cidrhost", inputs: []string{"input", "host"}, @@ -3570,7 +3560,6 @@ func componentProgramBinderFromAfero(fs afero.Fs) pcl.ComponentProgramBinder { var unimplementedFunctionBugs = map[string]string{ "coalesce": "pulumi/pulumi-converter-terraform#65", "coalescelist": "pulumi/pulumi-converter-terraform#65", - "compact": "pulumi/pulumi-converter-terraform#65", "distinct": "pulumi/pulumi-converter-terraform#65", "flatten": "pulumi/pulumi-converter-terraform#138", "format": "pulumi/pulumi-converter-terraform#65",