https://pulumi.com logo
Title
r

red-kangaroo-44125

09/13/2021, 12:48 PM
cluster_name = pulumi.Output.all(clustername=eks_cluster.name) \
    .apply(lambda args: f"{args['clustername']}")
print(cluster_name)
pulumi.export('cluster-name', eks_cluster.name)
pulumi.export('kubeconfig', utils.generate_kube_config(eks_cluster))
Hi: I am trying to write clustername and kubeconfig to a file, followed the Input and outputs doc for the same and wrote the above code, cluster is already created but when printing the variable I am getting.
pulumi:pulumi:Stack (aws-eks-eks-testing):
    <pulumi.output.Output object at 0x7f6d4007d280>
b

billowy-army-68599

09/13/2021, 6:24 PM
@red-kangaroo-44125 if you want to print the variable, you need to do the print inside the apply
r

red-kangaroo-44125

09/14/2021, 12:14 PM
ok, so if I want to use these values and render jinja templates all that I have to run inside the apply ?
b

billowy-army-68599

09/14/2021, 12:50 PM
that's correct!
s

shy-author-33795

11/23/2021, 11:56 AM
@red-kangaroo-44125, may I ask what your
utils.generate_kube_config
function looks like?