https://pulumi.com logo
#python
Title
# python
c

clean-engineer-75963

12/05/2019, 10:05 PM
Creating an AWS tag from the name value of a Kubernetes output:
Copy code
tags={
    "Name": f"{config.require('cluster.name')}_"
            f"{base_namespace.metadata['name'].apply(lambda x: str(x))}_backups",
}
Is giving me this tag:
Copy code
clustername_<pulumi.output.Output object at 0x7f1d972fa160>_backups
How am I supposed to be doing this?
In general, it beggars belief how difficult Pulumi makes it to get regular primtive Python types out of Pulumi objects.
I feel extremely misled by the claim that I get the full power of a programming language when I choose Pulumi, because it's so hard to do anything within this programming model.
q

quaint-artist-58613

12/05/2019, 10:42 PM
Can you declare your tag inside apply {}?
m

mysterious-egg-7415

12/06/2019, 12:42 AM
I feel your pain @clean-engineer-75963. It's a bit constraining without access to the primitive types
2 Views