https://pulumi.com logo
Title
t

tall-computer-65747

04/11/2023, 2:42 PM
Hi all 👋 I am trying to test resource creation for my Pulumi stack. I have used
OutputUtilities.GetValueAsync
to test the output values of tags etc, but I want to be able to test the
Protect
value from the
CustomResourceOptions
set for a resource. I am struggling to do this currently and cannot seem to find a way to pull any values from the
CustomResourceOptions
configuration. Is there a way to do this? Thanks 👍
var serviceAccountDisplayNames = (
                await Task.WhenAll(
                    _resources
                        .OfType<ServiceAccount>()
                        .Select(t => OutputUtilities.GetValueAsync(t.DisplayName))
                )
            );
e

echoing-dinner-19531

04/12/2023, 2:00 PM
I don't think this is exposed currently. Seems a reasonable request to add it, can you open a ticket at https://github.com/pulumi/pulumi-dotnet/issues?
t

tall-computer-65747

04/14/2023, 8:33 AM
Thanks @echoing-dinner-19531, I think there might be an open PR for this https://github.com/pulumi/pulumi-dotnet/pull/101/files. It may just need some tweaking from the looks of things
e

echoing-dinner-19531

04/14/2023, 8:36 AM
That was for the stack outputs rather than the resource options.
t

tall-computer-65747

04/19/2023, 10:41 AM
Ah I see, okay I will raise a new issue 🙂