https://pulumi.com logo
b

bored-table-20691

01/06/2022, 11:46 PM
I feel with high probability I am missing something super dumb, but given a
pulumi-eks
eks.Cluster
type, how do I get the name of that cluster (e.g. if I need to pass it to an annotation or an IAM role or some such)? Specifically in Go, I’ve seen several examples in TS (specifically,
cluster.eksCluster.name
).
OK, conclusion is:
Copy code
clusterName := cluster.EksCluster.ApplyT(func(cluster *awseks.Cluster) pulumi.StringOutput {
		return cluster.Name
	})
b

billowy-army-68599

01/07/2022, 4:47 AM
sorry for the delay here, yes this is the only way at the moment because optional types aren't usable in Go without generics 😞
b

bored-table-20691

01/07/2022, 5:33 AM
No worries - I needed to write the question up to get the epiphany of how to do this 🙂
4 Views