This message was deleted.
# typescript
s
This message was deleted.
l
Why is it being created? Do you have a new Pulumi name which is different from the Pulumi name of he resource in state?
r
yes earlier it was like this
Copy code
const eksAddonCoredns = new aws.eks.Addon(
    "eksAddon",
    {
      addonName: "coredns",
      clusterName: prefix,
      resolveConflicts: "OVERWRITE",
      addonVersion: eksAddonCorednsVersion,
    },

    {
      dependsOn: [k8sCluster],
    },
  );
now it is updated like this
Copy code
const eksAddonCoredns = new aws.eks.Addon(
    "Coredns",
    {
      addonName: "coredns",
      clusterName: prefix,
      resolveConflicts: "OVERWRITE",
      addonVersion: eksAddonCorednsVersion,
    },

    {
      dependsOn: [k8sCluster],
    },
  );
this part is updated
Copy code
new aws.eks.Addon(
    "Coredns"
l
So that means that there two different resources. "eksAddon" is being deleted, and "Codedns" is being created.
Pulumi creates new resources before deleting old ones, in order reduce the risk of service interruption.
But because these are both the same resource, with the same ID, the creation fails, because you can't have 2 resources with the same AWS ID.
r
oh so i should first remove the resource and then recreate reosurce with new name is that right
l
You could, but Pulumi has a better way.
r
oh what us the better way ?
l
You can add an alias to the opts of the resource, so that Pulumi knows that the new resource is actually the old one.
1
It won't delete it.
r
oh is there link on how to add alias ?
l
Looking for it now.