-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow region change #997
Allow region change #997
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly LGTM, 1 question around stale state that we might want to group with this.
deployed[k] = v.Status | ||
} | ||
} | ||
if len(deployed) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may need to couple this with deleting the old pulumi state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with how state works, this should just be mostly the same as it was before. Can you explain a bit more what you mean and why it should delete old pulumi state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, and it may not be pulumi state necessarily (it may be klotho2 state referencing non-existent resources since we never clear that file). We've seen cases where changing region and redeploying causes deploy time errors about vpcs etc. I was thinking we could start with modifying state to clear this out and see if that's enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing region and redeploying causes deploy time errors
This should only happen if the klotho / pulumi state is out of sync with AWS, right? Since this checks whether any resources are destroyable before allowing the region swap. Any resource that was deployed and not properly cleaned up would still be in a destroyable state I'd think. If not, that sounds like there's a bug somewhere.
If that's that case, for the purposes of this PR, I'm leaning to it being out of scope and we should cut a new card for it.
Tested with up -> down -> change region -> up
|
Preview (no deployed resources, allowed)
Deploy switch region (disallowed)