sparse-intern-71089
08/16/2021, 2:55 PMwitty-candle-66007
08/16/2021, 3:29 PMnew_account.sid, it throws an error or something?cool-belgium-78445
08/16/2021, 3:31 PMwitty-candle-66007
08/16/2021, 3:31 PMcool-belgium-78445
08/16/2021, 3:34 PMnew_account.sid everything works fine but when I pass that into another resource I get the following:
TypeError: 'Output' object is not callable
error: an unhandled error occurred: Program exited with non-zero exit code: 1cool-belgium-78445
08/16/2021, 4:04 PMTypeError: 'Output' object is not iterable, consider iterating the underlying value inside an 'apply'witty-candle-66007
08/16/2021, 4:08 PMapply stuff in Pulumit:
https://www.pulumi.com/docs/intro/concepts/inputs-outputs/cool-belgium-78445
08/16/2021, 4:09 PMcool-belgium-78445
08/16/2021, 4:11 PM<http://requests.post|requests.post>("<http://localhost:5000>", {"f":new_account.sid.apply(lambda sid: f"{sid}")}), and that did not workcool-belgium-78445
08/16/2021, 4:11 PMTypeError: 'Output' object is not iterable, consider iterating the underlying value inside an 'apply' same errorwitty-candle-66007
08/16/2021, 5:09 PMcool-belgium-78445
08/16/2021, 5:15 PMwitty-candle-66007
08/16/2021, 5:27 PMdef create(self, props):
subaccount = self.parent_client.api.accounts.create(friendly_name="{}-{}".format(props["name"], stack))
Are you sure subaccount and more importantly subaccount.sid is defined? or that new_account.sid is defined in the calling code?cool-belgium-78445
08/16/2021, 5:29 PMwitty-candle-66007
08/16/2021, 5:32 PMpulumi.export("new_account", new_account) after the new_account declaration, and see that new_account has the various properties?cool-belgium-78445
08/16/2021, 5:32 PMpulumi stack export I everything outputs like it shouldcool-belgium-78445
08/16/2021, 5:33 PMwitty-candle-66007
08/16/2021, 5:35 PMpulumi.export in your code and see what it shows - just to see what outputs the code sees.cool-belgium-78445
08/16/2021, 6:44 PMcool-belgium-78445
08/16/2021, 6:47 PMwitty-candle-66007
08/16/2021, 7:16 PM<http://requests.post|requests.post>("<http://localhost:5000>", {"f":new_account.sid.apply(lambda sid: f"{sid}")}),witty-candle-66007
08/16/2021, 7:18 PMnew_account.sid.apply(lambda sid: <http://request.post|request.post>("<http://localhost:5000>", {"f":sid}))cool-belgium-78445
08/16/2021, 7:37 PMcool-belgium-78445
08/16/2021, 7:38 PMwitty-candle-66007
08/16/2021, 7:43 PMcool-belgium-78445
08/16/2021, 7:49 PM