bland-army-56447
03/22/2021, 11:44 AMapiECRRepo, err := ecr.NewRepository(ctx, "fooapp-api-pulumi", nil)
if err != nil {
return err
}
ctx.Export("apiRepoUrl", apiECRRepo.RepositoryUrl)
uiECRRepo, err := ecr.NewRepository(ctx, "fooapp-ui-pulumi", nil)
if err != nil {
return err
}
ctx.Export("uiRepoUrl", uiECRRepo.RepositoryUrl)
Now I’m trying out the import feature using this code:
apiECRRepo, err := ecr.NewRepository(ctx, "fooapp-api-pulumi-b730658", nil, pulumi.Import(pulumi.ID("fooapp-api-pulumi-b730658")))
if err != nil {
return err
}
ctx.Export("apiRepoUrl", apiECRRepo.RepositoryUrl)
uiECRRepo, err := ecr.NewRepository(ctx, "fooapp-ui-pulumi-b25077e", nil, pulumi.Import(pulumi.ID("fooapp-ui-pulumi-b25077e")))
if err != nil {
return err
}
ctx.Export("uiRepoUrl", uiECRRepo.RepositoryUrl)
The repos were created with the name fooapp-...
and then Pulumi added some lil hash/id whatever. I’m not sure if this belongs to the name/id now or not.
The error I get:
Diagnostics:
aws:ecr:Repository (fooapp-api-pulumi-b730658):
warning: inputs to import do not match the existing resource; importing this resource will fail
aws:ecr:Repository (fooapp-ui-pulumi-b25077e):
warning: inputs to import do not match the existing resource; importing this resource will fail
So my question is: What inputs do not match?
I can also see by [diff: ~name]; 1 warning
that it seems the name differs. But is there any way to show me the diff? Then I could get an idea on what’s the issue but nope. If I jun the command with -j
to get JSON output I can see the diff but it says "detailedDiff": null
Great 😅No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by