I am really having some trouble I was hoping someo...
# getting-started
g
I am really having some trouble I was hoping someone would be able to help. I am trying to feed a Pulumi Python Output to a configuration that expects a string. For the life of me I cant seem to figure out how to get the output object to a string. The string I need to feed is to another python module for configuring a SaaS application, but I can imagine I am going to have the same problem if I need to use a pulumi program inline with AWS boto3. Can someone share a snippet? This is the only way I have found that somewhat works. Write to a file and then read it when I need to assign the variable which is horrible
Copy code
# define a function to write an arn to a file
def write_to_file(arn):
    f = open("arn.txt", "a")
    f.write(arn)
    f.close()

json = lb.arn.apply(lambda a: write_to_file(arn=a))
b
anything that takes a string has to be done inside an `apply`: I guess you got that example from here: https://www.leebriggs.co.uk/blog/2021/05/09/pulumi-apply.html 🙂 If you want to explain exactly what you want to do with boto3 I can try populate a better example