This message was deleted.
# aws
s
This message was deleted.
l
You need to either define the subnet yourself, or add a transformation for it. The transformation can be on the resource, or on the entire stack.
p
Thanks for the answer. My use case is that: 1. create vpc with subnets 2. create eks cluster by the vpc 3. tag the subnets with the cluser name Is this doable by Pulumi?
l
Is the cluster dependent on the subnets?
p
Yes, I would say the cluster apply those subnets via the vpc.
l
It wouldn't be possible in a single stack in Pulumi, I think? And if you use a second stack (and automation-api) to import the subnets and apply the tags, then running the first stack would remove the tags again...
So in short, probably not possible in Pulumi. You may want to use the AWS SDK yourself, from some post-cluster-creation code.
Or, if you know the name of the cluster before creating the VPC (which you probably do?) then tag them at creation time, and use the same name for the cluster.
p
yeah I don't know it, cause there will be suffix dynamically generated by Pulumi.
l
You can do that yourself, or use namePrefix (if it exists) and tag the subnet with that?
No, no namePrefix in cluster 😞
So I think your best option might be to set the name manually. You can either forget about the random suffix (and add deleteBeforeUpdate), or create the random suffix yourself.
p
Got it. Thanks!