I'm updating our version of aws-native. This incl...
# general
b
I'm updating our version of aws-native. This includes updating past 0.72.0, which has a bunch of breaking changes to the names of classes and fields (https://github.com/pulumi/pulumi-aws-native/blob/master/CHANGELOG.md#0720-2023-08-04). That's fine (I like the changes, and have made them in the codebase), but I'm trying to figure out a way to make this transition gracefully. The problem is that pulumi seems to believe these are new things. So for instance, it plans to delete an
aws-native:ec2:VPC
and create a just-happens-to-be-the-same
aws-native:ec2:Vpc
. Some of these are annoying to recreate (require maintenance windows and downtime), and others are imported and have
protect=True
because we really can't be recreating them. What I'm trying to figure out is if there's a way to coerce the state db to recognize that these are actually the same things and don't need to change anything in the physical objects, just an internal re-accounting. This seems like it should be possible, but I'm not sure quite how to go about it. (I'll also accept that I'm using a preview module and thus put myself into this problem simple smile )
hmm, maybe a state delete and an import of the resources (as if we're adopting them fresh from something previously created manually)?
s
That's a valid strategy.
r
Depends on the diff. Some may be achievable via alias
b
ah hah! at least tentatively, that does seem to work, with something like
aliases=[pulumi.Alias(type_="aws-native:ec2:VPC")],
. The
type_
field is documented as existing but that's about it, but between the mention of it and examples in the source code and https://github.com/pulumi/pulumi-aws-native/issues/293 to remind me how to construct type names for aws-native, I made some progress
between both of those options I think I should be able to figure out a good plan. Thanks!