Hi pulumi community: Is there a way to decommissio...
# aws
s
Hi pulumi community: Is there a way to decommission the defaultNodeGroup created by
@pulumi/eks
? I tried to switch the
skipDefaultNodeGroup
from
false
to
true
however I saw
Copy code
error: ResourceError: an instanceProfile is required
        at /Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/nodegroup.ts:966:19
        at /Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/output.ts:490:31
        at Generator.next (<anonymous>)
        at /Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/pulumi/output.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/pulumi/output.js:17:12)
        at applyHelperAsync (/Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/pulumi/output.js:298:12)
        at /Users/c.shen/GitRepos/brainfish-ai/brainfish-universe-infrastructure/compute/eks/node_modules/@pulumi/output.ts:352:13
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
I believe this is expected as if the NodeGroup has been created initially, the lingering resources would be traversed anyway. Without instanceProfile in place (as it's going to be removed by skipDefaultNodeGroup set to true), the validation fails. So my question is: if there is a proofed way to remove previously created default Node Group?
q
Could it be that this error was not raised by the cluster, but by a different node group component? If you skip the default node group, the default instance role (and instance profile) won't be created. By default other non-default node groups would use this instance profile if you don't specify one. Now that you're setting
skipDefaultNodeGroup
this is no longer the case. Just speculating without knowing the code, but could you try setting
createInstanceRole
on the cluster or alternatively pass an instance profile to the explicit node groups you're creating
s
You're spot on Florian, I found the relevant code in the
@pulumi/eks
v2. This logic improved in v3 by you where instanceProfile and instanceRole are handled in the same bracket pairs. This is great for users who want to enable
skipDefaultNodeGroups
while still creating NodeGroups using Pulumi Crosswalk!