This message was deleted.
# aws
s
This message was deleted.
b
did you create a new stack? or use the existing stack?
s
Use the existing stack. Shall I create a new one? (And if so, how to make all resources of the old account in it)
b
you can’t move all the resources. What’s the end goal here? All the resources in account A now live in new account B?
s
That's the goal
b
I would just destroy stack A with
pulumi destroy
and change the credentials, then run
pulumi up
with the new creds
unless you need to migrate data, in which case you’re going to have to do some lifting
s
No need to migrate data, simply create the same resource on the new env
And how would I go changing the credentials? Is it written somewhere in pulumi beside the .aws?
b
how did you initially set them?
s
Using env variables
b
okay, so credentials are associated to a stack
so do the following:
Copy code
# make sure you're authenticated to the original account
export AWS_ACCESS_KEY_ID=whatever your key is
export AWS_SECRET_ACCESS_KEY=whatever your secret key is
pulumi destroy

# then set up new environment variables for the new account
export AWS_ACCESS_KEY_ID="new access key"
export AWS_SECRET_ACCESS_KEY="new secret key"
pulumi up
s
Thank you!!