Hey folks, I have a eks cluster created using pulu...
# aws
s
Hey folks, I have a eks cluster created using pulumi which was created using a explicit aws provider. Now I am trying to refactor the code and change the provider(use a new provider), I have added aliases to this new provider to include the old provider name but it still tries to replace the cluster. Is there any way to do this without recreating any of the resource and manually editing the state file Tried with both aliasing name and urn, both doesn't seem to work. I'm using
pulumi/aws
provider new provider:
Copy code
const awsProvider = new aws.Provider(`global-aws-provider`, {
        region: <aws.Region>env.region,
        assumeRole: {
            roleArn: providerRoleArn,
        },
        skipMetadataApiCheck: false,
    }, {
        aliases: [
        {
            name: "aws-provider",
        }])
l
I don't think the alias feature does anything useful for providers. You could set the ignoreChanges opt in each resource to ignore changes to the provider? I'm not sure that would work. I've only done this sort of thing a few times and I've always manually updated the state file. If you're using the eks provider, note that it provides component resources. Each of the child resources would need to have its provider updated. I don't know how to achieve that...