given an object with a secret value: ```myProject:...
# typescript
g
given an object with a secret value:
Copy code
myProject:thing
   foo: bar
   secretThing: 
      secure: <random>
I believe the recommended way to use this object is
config.getSecretObject
, but is it safe to do
config.getObject
to grab the value of
foo
? I.e the only thing that matters is that you don't pass around the decrypted value of
secretThing
because it might be stored in state, but calling
getObject
on a secret doesn't matter if you discard the result, right? For context, the reason I'm trying to do this is that I'm trying to pass the value of
foo
to a provider which expects
pulumi.Input<string> | undefined
, but
foo
is optional, so the typing for
foo
(when retrieved as part of a secretObject) is
pulumi.Output<string | undefined>
which isn't a valid input value
👀 1
e
oh we really need to fix the optional typing annotations, long standing issue I think you'll be ok if you just type cast it