Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling RegisterOutput in a Component Resource is not working with Output that contains an OutputType #409

Open
jkerken opened this issue Nov 22, 2024 · 2 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@jkerken
Copy link
Contributor

jkerken commented Nov 22, 2024

As per documentation we added a RegisterOutputs() call to the end of our component resources.

If you have an output value like this:

    [OutputType]
    public sealed class ComplexOutput
    {
        public readonly string Name;

        [OutputConstructor]
        private ComplexOutput(string name)
          Name = name;
        }
    }

And use this in a component resource

public sealed class MyComponentResource: ComponentResource
{
    public MyComponentResource(string name, Args args, ComponentResourceOptions? options = null)
        : base("myType" name, args, options)
    {
      Output = Output.Create(new ComplexOutput("someValue"))
      RegisterOutputs()
    }

    [Output("output")]
    public Output<ComplexOutput> Output { get; init; }
}
A an exception will be raised "DatacenterOutput is not a supported argument type" in Pulumi.Serialization.Serializer.SerializeAsync
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Nov 22, 2024
@justinvp justinvp added kind/enhancement Improvements or new features kind/bug Some behavior is incorrect or out of spec and removed needs-triage Needs attention from the triage team kind/enhancement Improvements or new features labels Nov 23, 2024
@justinvp
Copy link
Member

Similar to #377

@penenkel
Copy link

I think it is also related to #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants