https://pulumi.com logo
Title
c

calm-queen-58154

05/04/2023, 1:46 PM
Hello all, I'm implementing pulumi little by little, starting with our dev infra. After changing computers I cloned the repo I used and, when running ``pulumi preview``, it insists on wanting to deleting my vpc and subnets. State is stored on pulumi cloud and shows correct values. I'm at a loss where to look (FAQ and Troubleshooting did not help). Python is used as the language. Aws crosswalk is used to define the vpc. Anyone has pointers where I can look?
m

millions-furniture-75402

05/04/2023, 1:59 PM
Are you sure you are logged in and talking to the correct stack?
pulumi whoami
pulumi stack ls
pulumi stack select
Are you in the correct directory and not trying to deploy something partial? Confirm in app.pulumi.com that the deployed resources look correct. Compare with your IaC. Consider refreshing the stack's state:
pulumi refresh
c

calm-queen-58154

05/04/2023, 2:03 PM
I am logged in Only one stack I ran a pulumi refresh that works correctly VPC id in the ``refresh`` output matches what I have on AWS. Running ``preview`` still shows it wants to delete my vpc 😞
m

millions-furniture-75402

05/04/2023, 2:03 PM
Did you originally declare your VPC with this project?
c

calm-queen-58154

05/04/2023, 2:04 PM
I did yes
on my previous computer
only thing that changed is me having a new computer
m

millions-furniture-75402

05/04/2023, 2:04 PM
Same version of the Pulumi packages?
c

calm-queen-58154

05/04/2023, 2:05 PM
mmm, that I am not sure, they should be very close, point release at most
I don't have my old computer on hand
m

millions-furniture-75402

05/04/2023, 2:05 PM
FWIW, that could be enough. You should be able to see the provider versions in the Pulumi console.
Is the VPC the only thing it's attempting to delete? Can you share the code?
l

limited-rainbow-51650

05/04/2023, 2:06 PM
@calm-queen-58154 can you paste more of what you see in your console on the respective pulumi cli commands?
m

millions-furniture-75402

05/04/2023, 2:06 PM
Correct region and AWS configuration?
c

calm-queen-58154

05/04/2023, 2:06 PM
@limited-rainbow-51650
region is correct, I don't think it would want to delete anything otherwise
I'm using different AWS credentials on this computer
m

millions-furniture-75402

05/04/2023, 2:09 PM
You are deleting an RDS Instance as well?
Do your AWS credentials have the same permissions attached as the previous?
c

calm-queen-58154

05/04/2023, 2:10 PM
It does have same permissions. The RDS was created manually and I imported it
m

millions-furniture-75402

05/04/2023, 2:10 PM
Why does it look like it's getting deleted? Did it have it's own VPC?
c

calm-queen-58154

05/04/2023, 2:11 PM
I don't think so but I'm looking
it is still protected in the pulumi state, could that be causing issues?
The RDS DB is in the vpc created with pulumi
m

millions-furniture-75402

05/04/2023, 2:13 PM
Can you share any of your resource declarations?
l

limited-rainbow-51650

05/04/2023, 2:13 PM
Did you commit the stack config file for your
dev
stack to source control as well? That would be the
Pulumi.dev.yaml
file.
c

calm-queen-58154

05/04/2023, 2:13 PM
@limited-rainbow-51650 I did yes
@millions-furniture-75402 I can, is there a part in particular?
m

millions-furniture-75402

05/04/2023, 2:14 PM
The more context you can provide, the better.
When you refreshed, did you apply the changes?
I assume because this is
dev
you aren't super concerned if it gets blown away?
c

calm-queen-58154

05/04/2023, 2:15 PM
I believe I did
m

millions-furniture-75402

05/04/2023, 2:16 PM
Did you rename your VPC?
c

calm-queen-58154

05/04/2023, 2:16 PM
I did it again to be sure, same result
I did not rename it
l

limited-rainbow-51650

05/04/2023, 2:16 PM
The screenshot of the outputs you posted earlier, was that part of a
pulumi up
where these resources where changed/deleted?
c

calm-queen-58154

05/04/2023, 2:17 PM
part of a pulumi preview
l

limited-rainbow-51650

05/04/2023, 2:19 PM
and the preview could show you everything until the end? No
<unknown>
indicators for certain properties somewhere in the complete output?
c

calm-queen-58154

05/04/2023, 2:20 PM
sent as an mp
So, I forgot to push the latest code updates which meant it was trying to do something different. /me banging head on table
Can confirm things work much better with up-to-date code ... sigh, what a nitwit I am