I cannot get aliases to work to migrate my resourc...
# general
I cannot get aliases to work to migrate my resources when I move them inside component resources. I have a bunch of resources that didn't have an explicit parent. I created a component resource and moved all existing resource inside. Then I exported the stack and took the `urn`s to use in the
argument of each existing resource. When I
pulumi up
, all resources are to be recreated. I am pretty sure the urn is correct, as I am taking it from the exported stack file. Here is an example resource:
Copy code
const logGroup = new aws.cloudwatch.LogGroup(`${name}_cloudwatchLogGroup`, {}, { provider, parent: this, aliases: ["urn:pulumi:edith-lookup-feat::edith::aws:cloudwatch/logGroup:LogGroup::cloudwatchLogGroup_edith-lookup-service"] });
What am I doing wrong?
By the way, before trying `urn`s I tried using the same name, and using
[{name: oldname, parent: undefined}]
as an
argument, and those didn't work either: all attempts always result in delete and recreation of resources.
What is the full urn of the existing resource? What is the desired urn after the migration?
Also - are you using recent versions of both the CLI and the AWS package?
Thank you for getting back to me, Luke. I found the problem: I have the latest version of Pulumi, but the node package was not up to date. It is working now.
👍 1