Skip to content
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

API keys deleted when migrating from v1 -> v2 #584

Open
MatejBalantic opened this issue Mar 30, 2023 · 2 comments
Open

API keys deleted when migrating from v1 -> v2 #584

MatejBalantic opened this issue Mar 30, 2023 · 2 comments

Comments

@MatejBalantic
Copy link
Contributor

Our API keys got deleted & recreated when we migrated this plugin from v1 -> v2.

We traced the issue to the naming of the keys in the CloudFormation template.

V1: GraphQlApiourname
V2: GraphQlApiKeyourname

Note the added Key string. This causes CloudFormation to delete existing keys and create new ones.

Luckily we caught this in staging, so we are working around the problem now by manually adding a new key to the AppSync instance via AWS console, using that one until the updated CloudFormation stack is deployed, and then deploying our clients with the newly generated keys.

This is probably impossible to resolve now, because "fixing" it would break projects using the v2 version, but we should maybe add something to the migration docs?

@bboure
Copy link
Collaborator

bboure commented Mar 30, 2023

Oh, sorry about that.
I tried to be backward compatible as much as I could, but this one must have slipped.

Yes, let's add this to the migration doc. (Would you mind opening a PR?)

Unfortunately, yes, fixing this would become a breaking change in v2, so we can't do that.

A dirty workaround to avoid breaking would be to manually add the Key resource (with the correct logical id) under the serverless.yml resources.

@MatejBalantic
Copy link
Contributor Author

MatejBalantic commented Mar 31, 2023

No worries, bugs happen :)

I really appreciate all the work you all did to make this plugin happen.

I've added the PR with clarifications in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants