hi guys, I’m trying to iterate over an object in p...
# general
a
hi guys, I’m trying to iterate over an object in pulumi by loading it with
require_object
but its not working as I’m expected. this is the object:
Copy code
endemic:backend_services:
    service_a: 
      protocol: HTTP
      timeout: 30
      port: 80
      instance_group: lala
      health_check: lala-hc
    service_b: 
      protocol: HTTPS
      timeout: 30
      port: 443
      instance_group: kuku
      health_check: kuku-hc
and this is how I’m trying to load it
Copy code
config_obj = pulumi.Config('endemic')
backend_services = config_obj.require('backend_services')
when I’m printing it its showing me only the names
Copy code
for service in backend_services:
    print(service)
service_a
service_b
how do I access to the inside parameters? and if it’s possible I’d rather prefer to use the
pulumi config
variables load inside, i.e:
service_protocol = config_obj.require('service_a:protocol')
let me know if you have other suggestion for the variables structure thanks a lot
?
b