busy-monitor-69572
08/03/2023, 11:16 PMproj:services:
- name: svc1
secret: 123zyx
- name: svc2
secret: 456zyx
- name: svc3
secret: 999abc
and read it in using requireObject()
. I am trying to find a way to make the 'secret' attribute a config secret. It seems you can only have secrets at the yaml top level and can not construct your own in code. Is there an equivalent to config.getSecret()
where I pass in the ciphertext?
interface MyService {
name: string
secret: string
}
const services = stackConfig.requireObject<MyService[]>('services')
services.forEach((service) => {
... pulumi make magic resources
}
fast-vr-6049
08/03/2023, 11:24 PMpulumi
CLI to do so:
pulumi config set --path 'services[0].secret' --secret
busy-monitor-69572
08/03/2023, 11:26 PM