Hello all, I'm implementing pulumi little by litt...
# aws
c
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
Are you sure you are logged in and talking to the correct stack?
Copy code
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:
Copy code
pulumi refresh
c
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
Did you originally declare your VPC with this project?
c
I did yes
on my previous computer
only thing that changed is me having a new computer
m
Same version of the Pulumi packages?
c
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
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
@calm-queen-58154 can you paste more of what you see in your console on the respective pulumi cli commands?
m
Correct region and AWS configuration?
c
@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
You are deleting an RDS Instance as well?
Do your AWS credentials have the same permissions attached as the previous?
c
It does have same permissions. The RDS was created manually and I imported it
m
Why does it look like it's getting deleted? Did it have it's own VPC?
c
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
Can you share any of your resource declarations?
l
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
@limited-rainbow-51650 I did yes
@millions-furniture-75402 I can, is there a part in particular?
m
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
I believe I did
m
Did you rename your VPC?
c
I did it again to be sure, same result
I did not rename it
l
The screenshot of the outputs you posted earlier, was that part of a
pulumi up
where these resources where changed/deleted?
c
part of a pulumi preview
l
and the preview could show you everything until the end? No
<unknown>
indicators for certain properties somewhere in the complete output?
c
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