https://pulumi.com logo
#general
Title
# general
r

ripe-king-6101

05/17/2023, 5:05 PM
I having an issue with a stack all of a sudden trying to rename half of the resources. It seems to be an issue with auto-generated resource name suffixes changing. I'm looking for advice or troubleshooting help.
I have a project with 70 resources, mainly AWS. I added the pulumi-auth0 provider and imported an auth0 tenant into the stack. Now every preview is showing 32 resources are going to be replaced, and some updated resources. The diff is showing these replaces are due to the auto-generated resource name suffixes changing, and are mainly delete-replace operations. I am not sure what caused Pulumi to change all of these auto-generated name suffixes. Here is an example resource:
Copy code
+-aws:ecs/service:Service: (replace) :unlock:
        [id=arn:aws:ecs:us-east-1:***:service/service-dev-ecs-cluster-d9270e6/service-dev-worker-ecs-service-da03bc8]
        [urn=urn:pulumi:dev::service::aws:ecs/service:Service::service-dev-worker-ecs-service]
        [provider: urn:pulumi:dev::service::pulumi:providers:aws::default_5_41_0::29181499-5388-4c35-ab5b-b995c17ce9bc => urn:pulumi:dev::service::pulumi:providers:aws::default_5_41_0::output<string>]
      ~ name          : "service-dev-worker-ecs-service-da03bc8" => "service-dev-worker-ecs-service-2600be6"
I'm using Pulumi cloud for state management. There is no dependency version pinning which may have contributed to the problem. Luckily this is only the dev stack, a preview of the prod stack does not show any resource changes. I have tried importing the state from the last deployment before these issues happened and running a preview from the commit of that last deployment, however I am still seeing the 32 replacements due to name changes. This leads me to believe the issue isn't in the state. I have also deleted a resource from the state and imported it again, but it is still trying to rename the resource like above. Does anyone have ideas or any guidance with this issue?
Another question, are auto-names derived (hashed) from something? What would cause auto-names to change?