https://pulumi.com logo
Title
f

few-pillow-1133

04/25/2021, 11:06 PM
structured config error Given
config:
  aws:profile: mra_nonprod
  rds:data:
    username: test
    password:
      secure: AAABAL8fPsdZipEyyFiU/rw8a1bkvv1oL/KAhTBNGtGKL7TL
  rds:data2:
    instance:
      password:
        secure: AAABADa3wuZn+sjN4DHRso/Ap07nSI1w1c7TY5nK6U90CYxk
  rds:mykey:
    some:
      secretkey:
        secure: AAABAK5wKE2QbOnIBj4zQShhwNko7LA0xwwlNXrI+BViL0wx9ekM9FDHOLM=
  rds:password:
    secure: AAABAL8fPsdZipEyyFiU/rw8a1bkvv1oL/KAhTBNGtGKL7TL
  rds:work:
    check: false
Config access seems not to be able to see most data
print (pulumi.Config('aws').get('profile')) # None
print (pulumi.Config('rds').get_object('data2')) # None
print (pulumi.Config('rds').get_object('mykey')) # None
print (pulumi.Config('rds').get_object('data')) # print config data correctly
print (pulumi.Config('rds').get_secret_object('mykey.some.secretkey')) # None
print (pulumi.Config('rds').get_secret_object('password')) # None
print (pulumi.Config('rds').get_secret_object('data2.instance.password')) # None
a

ambitious-father-68746

04/26/2021, 7:26 PM
Not sure this helps, but I'm using
pulumi.Config().require('foobar')
instead of the get functions and it's working for me. Added bonus is that I don't need to worry if it's secrets or not, Pulumi just deals with it.
f

few-pillow-1133

04/27/2021, 6:54 AM
Not working for me...\both getxx and requirexxx retrieves object, however requirexxx fails if key can't be located, whereas getxxx returns None in that case