This message was deleted.
# general
s
This message was deleted.
c
I understand I can do something like :
Copy code
url = Output.all([server.username, server.password]).apply(lambda l: f"http://{l[0]}:{l[1]}/")
But Is there a way to dump the whole server object and its fields?
g
You should be able to print the object inside the apply. Something along the lines of
Copy code
url = server_object.apply(lambda l: pprint(vars(l)))
Alternatively, you can view the state of your resources through the pulumi SaaS, or with
pulumi stack export
c
AttributeError: 'Instance' object has no attribute 'apply'   error: an unhandled error occurred: Program exited with non-zero exit code: 1
btw- does it work in the preview ?
may be i will pulumi.export("SERVER", server_object) and see it at the end ?
g
Ah, in that case, you need to wrap the object in an output before running apply:
pulumi.Output(server_object).apply(...)
It may not work during preview, as some of the values may not have been resolved yet. The export should also work.