I am thinking to use randomString from `@pulumi/ra...
# aws
e
I am thinking to use randomString from
@pulumi/random
as suffix, but not sure how can I make pulumi to regenerate it each time managednodegroup wants new resource
w
Which resource exactly is it that is being replaced? This sounds like it could be a bug in the library where
deleteBeforeReplace
should have been used.
e
it's
aws:eks:NodeGroup
deleteBeforeReplace
doesn't look right to me, because cluster will stay w/o nodes till new node group is created
code
Copy code
import * as eks from "@pulumi/eks";
...

commonName = '<env name here>'

const eksCluster = new eks.Cluster(commonName, {
  vpcId: vpc.id,
  fargate: false,
  skipDefaultNodeGroup: true,

...

const eksManagedNodeGroup = eks.createManagedNodeGroup(
  commonName,
  {
    cluster: eksCluster,
    nodeGroupName: commonName,
    nodeRoleArn: eksWorkerNodeGroupRole.arn,
...
  },
  eksCluster
);
I'd prefer eks lib to make nodeGroupName arg optional and generate it from resource name + suffix, using new suffix everytime new resource is created. The same approach which is usually used in other resources
w
I think I know what the problem is here - I've opened https://github.com/pulumi/pulumi-eks/issues/294 to track.