fast-whale-906404/18/2019, 5:49 PM
but it doesn’t work like I would expect:
record = route53.Record(dns_name, name=dns_name, records=[new_instance.private_ip], ttl=60, type="A", zone_id="..."") dns_name = record.name.apply(lambda n: n)
. What am I missing?
<pulumi.output.Output object at 0x110e60160>
incalculable-sundown-8251404/18/2019, 5:51 PM
transforms an Output into another Output by running a function on the value within that Output.
is the identity function, so what you get is
lambda n: n
, which is an output. You can’t operate directly with outputs, but you can use
to transform them and you can pass them directly to other resources: https://pulumi.io/reference/programming-model.html#outputs
fast-whale-906404/18/2019, 5:58 PM
incalculable-sundown-8251404/18/2019, 5:59 PM
is a no-op transformation on
record.name.apply(lambda n: n)
, whereas the thing you linked transforms an output by putting
on the front of it.
, but one that has been transformed according to your function
fast-whale-906404/18/2019, 6:03 PM
incalculable-sundown-8251404/18/2019, 6:03 PM
fast-whale-906404/18/2019, 6:04 PM
was to force a dependency
incalculable-sundown-8251404/18/2019, 6:06 PM
fast-whale-906404/18/2019, 6:22 PM
to work for me, though. Thanks @incalculable-sundown-82514!
incalculable-sundown-8251404/18/2019, 6:23 PM