I'm trying to replace a reference with a stub: ess...
# general
f
I'm trying to replace a reference with a stub: essentially an aws VPC object with a mostly empty ComponentResource. https://gist.github.com/sheenobu/a58297508055a3e4c83aee1b5f38432e I'm getting
Copy code
... (...-vpc):
    error: expected '::' in provider reference ''
Maybe you can't replace a resource from the AWS provider for one from a different provider? or is my aliases: wrong?
1
the XY problem is "moving a pulumi object with lots of dependencies from codebase A to codebase B while keeping references to vpc.id in A entact" I'm going to try to upgrade to 3.40.2... nope.
b
@fast-river-57630 your type token is wrong
Copy code
super("...", "my-vpc", {}, opts);
it needs to be
Copy code
super("foo:index:vpc"
f
my type token is right. I just removed the specifics from my example
I tried pkgcompanynameVpc
b
ah got it
f
i'm assuming pulumi.ComponentResources just dont have providers (i tried setting provider in opts) so when the dependency graph code is resolving a provider reference for a replaced object and that object is component resource it just throws up in the pulumi binary. not sure if you can trace the errors in the pulumi binary (+%v???) Found a workaround, will post. Thank you!
use a dynamic resource with a stub?? it did work: https://gist.github.com/sheenobu/a58297508055a3e4c83aee1b5f38432e I purposefully made create error out since this is just for stubbing out migrated objects!