I am trying to getCurrentSecretValue for a secret, however I got this error ( img 1) while I have checked it with condition ( img 2). and as you can see my secret does not have value ( img 3 )
how can I check if that is exist before getting it
09/21/2023, 10:15 PM
@late-journalist-61387 Pulumi is declarative, so just set a value in your Pulumi program?
09/21/2023, 10:18 PM
unfortunately , I need to get the old value from secret manager if exists and if the value is not exists, I set the value. that is because of a scenario with if condition check ( my pre question ) and I do this to avoid value lose
09/21/2023, 10:19 PM
this sort of imperative conditional logic doesn’t really work in Pulumi. I’d suggest importung the value into Pulumi state or setting it entirely outside every time, you can’t really have an either or thing.
Your only option if you want to go down that path is to have stack config that decides if the value is set that the user has to specify
09/21/2023, 10:21 PM
thank you for explaination
basically I am new to Pulumi
I reached another question! I will ask in a new thread