https://serverless-stack.com/ logo
#help
Title
# help
m

Mendel Lerner

02/11/2022, 4:09 PM
Hi, I'm importing an external secret into my stack. Is there any way to access a nested value at deploy time without hitting a wall with CF tokens? I know that this can be done for a top-level property:
Copy code
secret.secretValueFromJson('password').toString()
Is there a way to do it for a nested property? (such as
account.password
)
t

thdxr

02/11/2022, 4:58 PM
Note you probably don't want to use secretValueFromJson - I'm pretty sure this pulls it at synthesize time and eliminates the value of hiding it in a secret
It might even write the value to the cdk.context file
Where are you using the secret value?
m

Mendel Lerner

02/11/2022, 8:09 PM
I'm trying to create a Glue Connection resource which requires the password at creation time
j

Jay

02/14/2022, 9:25 PM
@Frank do you know if this can be done?
f

Frank

02/19/2022, 6:57 AM
Hey @Mendel Lerner I wasn’t able to get nested property after a quick try.
Maybe try asking in the AWS Developers slack channel. Let me know if you want an invite to it.
3 Views