Woudnt that stacks state then be for us-east-1? Yo...
# general
c
Woudnt that stacks state then be for us-east-1? You would want to create a new stack
h
I just updated configuration and changed the region. seems like a straightforward change allowed for the product. If this change should be disallowed, then I think the stack should fail fast.
i can create a new stack, but the bucket is already there. and i can’t destroy the stack for some reason (another post above this one)
c
When you destroyed the stack were you in the region that the stack was deployed to? The reason why I say you prolly need to create a new stack is because when you change your region it expects stack resources in that region. I am just assuming the reason you are getting the error. I havent ran into that problem yet, but I would create stacks within the region and then create a new stack for a different region.
h
yes, it does look this way. The reason it started was because it failed to provision EKS in us-east-1. then i changed the region and provisioned again. And it was success (sort of).
now that I am stuck in this situation what would be the recovery path?
b
@hundreds-lizard-14182 just to make sure I'm understanding correctly, you created an EKS cluster and bucket inside a stack, the bucket creation succeeded and then you changed the region for the stack?
w
If you no longer want anything deployed in
us-east-1
, you should set the region to
us-east-1
and
pulumi destroy
to cleanly tear down what you had (partially) deployed thre. Then you can re-deploy into another region by creating a new stack that is targetting the new region. Note that you can also create an instance of
aws.Provider
targeting a specific region, so you can have a stack with resources deployed to multiple regions. You could alternatively use that to create the new resources in the new region while allowing the old resources to still access the old region (and thus be destroyed cleanly). As for failing faster when you tried to get in this situation we have https://github.com/pulumi/pulumi-aws/issues/879 tracking some improvements we hope to be able to make here.
b
👍
aws.Provider
is region specific. You could also remove the old bucket from your pulumi state using
pulumi state delete <urn>
and rerun, which would then create a new bucket for you
h
The reason why the problem occurred in the first place was no support for AZs for EKS cluster creation. It was failing in us-east-1 and I posted about it here: https://pulumi-community.slack.com/archives/C84L4E3N1/p1588960107028500 Is it still an issue?
b
cc @breezy-hamburger-69619
b
We have an issue tracking this in p/pulumi-eks#95, and it is a common problem when using
us-east-1
— I’ve personally hit this in the AWS console a handful of times as well in that region, where as
us-east-2
or
us-west-2
have better success
h
Thank you, it helps