Open daenney opened 1 year ago
Rereading a bunch of the documentation, I think this is caused by some confusion on my part. RegisterResourceOutputs
is documented as:
Component resources can define their own output properties by using register_outputs . The Pulumi engine uses this information to display the logical outputs of the component resource and any changes to those outputs will be shown during an update.
This reads an awful lot like stack outputs, which is why I expected to see them in the result of pulumi up
. That doesn't appear to be the case.
But even if I register the output of a resource and then change an input that should affect that output, I still don't get any output contrary to what the documentation suggests. So if I add a "retain": server.instance.RebuildProtection,
to my pulumi.Map
that is passed into RegisterResourceOutputs
, create the server and then change my configuration to alter the value of RebuildProtection
to false
(it defaults to true
in my component), I still don't get any output in the CLI.
What happened?
I created a component resource based on the docs on https://www.pulumi.com/docs/intro/concepts/resources/components/. I call
ctx.RegisterResourceOutputs
at the end to register some outputs. When runningpulumi up
no outputs are displayed and no outputs are available according topulumi stack output
.Steps to reproduce
ctx.RegisterResourceOutputs
withpulumi.Map{}
that contains key-value pairspulumi up
Expected Behavior
I expected the outputs I register to be shown at the end of
pulumi up
.Actual Behavior
No outputs seem to exist and are not displayed on the console.
Output of
pulumi about
CLI
Version 3.46.1 Go Version go1.19.3 Go Compiler gc
Plugins NAME VERSION go unknown hcloud 1.10.1
Host
OS arch Version
Arch x86_64
This project is written in go: executable='/usr/bin/go' version='go version go1.19.4 linux/amd64'
Current Stack: prod
TYPE URN pulumi:pulumi:Stack urn:pulumi:prod::infra::pulumi:pulumi:Stack::infra-prod pulumi:providers:hcloud urn:pulumi:prod::infra::pulumi:providers:hcloud::provider hcloud:index/placementGroup:PlacementGroup urn:pulumi:prod::infra::hcloud:index/placementGroup:PlacementGroup::spread hcloud:index/sshKey:SshKey urn:pulumi:prod::infra::hcloud:index/sshKey:SshKey::laptop hcloud:index/sshKey:SshKey urn:pulumi:prod::infra::hcloud:index/sshKey:SshKey::desktop hcloud:index/firewall:Firewall urn:pulumi:prod::infra::hcloud:index/firewall:Firewall::firewall
Found no pending operations associated with prod
Backend
Name pulumi.com URL https://app.pulumi.com/daenney User daenney Organizations daenney
Dependencies: NAME VERSION github.com/pulumi/pulumi-hcloud/sdk 1.10.1 github.com/pulumi/pulumi/sdk/v3 3.44.2
Pulumi locates its logs in /tmp by default
Additional context
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).