structured config error Given ```config: aws:p...
# python
f
structured config error Given
Copy code
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
Copy code
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
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
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