This message was deleted.
# general
s
This message was deleted.
s
Does the record already exist?
b
@stocky-spoon-28903 it is created during the run. so no. but when i try to use it for
Copy code
aws.lb.ListenerRule
in
Copy code
conditions=[
        {
            "hostHeader": {
                "values": [route53_record.fqdn]
            }
        }
it works perfectly well. also I tried to use
depends on
with no luck. also during next runs, when the record is already created, i still get
<pulumi.output.Output object at 0x10d1c0780>
instead of the record value.
s
If you're getting it as an output from the resource you'll need to use
apply
so something like
record.fqdn.apply(lambda x: render_template({'sometihng': x})
b
@stocky-spoon-28903 i use apply. i tried
Copy code
pulumi.Output.all(route53_record.fqdn).apply(lambda fqdn: fqdn),
and
Copy code
route53_record.fqdn.apply(lambda fqdn: fqdn),
regarding your option
so something likeĀ 
record.fqdn.apply(lambda x: render_template({'sometihng': x})
i'm not sure i fully understand how to use it. i have a list of variables that i use to render the resulting json from the template, but the example, that you provided implies that there is only one variable -
record.fqdn
? or i misunderstood you ?
s
So there's no general way to extract a string from an output - you need to run the code you want to use the value in in the lambda for the output, and that will give you a transformed output.
https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs I'd suggest having a read through this document to understand more about the input and output system