I'm trying to create a new collection from a prope...
# dotnet
f
I'm trying to create a new collection from a property of type Output<ImmutableDictionary<string, string>?> to set a property of type InputMap<string> but can not get it to work. The preview keeps saying it is going to remove tags: {SomeKey: "SomeValue"} and replace it with tags: output<string>.
Copy code
var tags = ResourceGroup.Tags.Apply(rgTags =>
            {
                var tags = new Dictionary<string, string> { { "SomeKey", "SomeValue" } };
                if (rgTags == null)
                {
                    return tags;
                }

                // Other logic to mainpulate tags goes here

                return tags;
            });

new PrivateEndpoint("name", new PuluimiResourceArgs{ Tags = tags}};
b
Try returning a Dictionary<string,object>.
f
Unfortunately that did not work. A type of Output<Dictionary<string,object>> can not be assigned to InputMap<string> (Compilation error). I even tried creating a Dictionary<string,object> outside of the apply and it doesn't work either.