https://pulumi.com logo
#pulumi-cloud
Title
# pulumi-cloud
b

bored-activity-40468

04/09/2023, 6:46 AM
Discovered
<https://api.pulumi.com/api/stacks/{org}/{project}/np/decrypt>
after digging in the archive. Where is the best place to make an issue to have it added to
<https://api.pulumi.com/api>
? And is
BuildDecrypt
exposed or only
decrypt
?
l

lemon-agent-27707

04/10/2023, 2:27 PM
Any issue or request regarding the service can be opened via github.com/pulumi/pulumi-cloud-requests
And is
BuildDecrypt
exposed or only
decrypt
?
Yes, there is
<https://api.pulumi.com/api/stacks/{org}/{project}/{stack}/batch-decrypt>
I'm curious, why are you trying to use the decryption APIs directly?
b

bored-activity-40468

04/10/2023, 6:30 PM
Ah thanks for that. For this use case I'm calling the Rest API and can't use a StackReference. I have a stack for managing certs that uses that Acme provider. It runs periodically and updates certs if needed. Other stacks can use that info but I didn't want to do it via exports and stack ref (maybe a bad idea 🙂 ). So a downstream stack can create a cert using that info retrieved from the rest api. Is there a way to decrypt using Output.Unsecret or something else? I messed with Unsecret but wasn't able to get it to work.
Or maybe I'm missing a way to do
pulumi stack export --show-secrets
via the rest api. When I do
/api/stacks/{organization}/{project}/{stack}/export
I get back encrypted values with
ciphertext
l

lemon-agent-27707

04/10/2023, 6:51 PM
I didn't want to do it via exports and stack ref
I'm curious why you didn't want to do this.
Or maybe I'm missing a way to do
pulumi stack export --show-secrets
via the rest api.
Depending on the structure of the thing running your program, you could use automation API to retrieve stack outputs.
b

bored-activity-40468

04/10/2023, 7:05 PM
Now that I think about, I can't remember why 🙂 And even have them registered as outputs already. Probably an excuse to play with the rest API. 🙂
Switched back to using Outputs, the Output.JsonSerialize/Deserialize is awesome!
8 Views