This message was deleted.
# python
s
This message was deleted.
b
@mammoth-optician-14118 when you say futher along in the code, what do you mean? Concretely, this code:
Copy code
elasticsearch_output = program.small_cluster.elasticsearch.apply(lambda es: es.__dict__)
print(f'elasticsearch_output {elasticsearch_output}')
Should be like this:
Copy code
elasticsearch_output = program.small_cluster.elasticsearch.apply(lambda es: print(es))
but it looks like you’re trying to use an output from automation API, which isn’t how it works
outputs work to create a graph inside a pulumi program. Automation API is the driver of a program. You can’t directly access outputs from automation API
m
Ya I re-read the documentation and saw that. I figured out how to solve my problem with the automation api the proper way leveraging pulumi.export and up_res.outputs.
🙌 1
It gives me the results I need.
😀 1
For instance I appended this to the cluster:
Copy code
pulumi.export("id", self.small_cluster.id)
and then accessed it in my code with:
Copy code
id = up_res.outputs['id'].value
I assume this is the correct way?
b
yeah that looks correct!
m
Perfect! Thanks!