Description
Describe the bug
When adding codegen to a project (appsync not created with amplify) with apiId option. If a new developper enter the project and init amplify selecting an existing env, amplify status will tells him that pushed changes will delete it.
To Reproduce
Steps to reproduce the behavior:
- Create an amplify project and add codegen: amplify add codegen --apiId AppSyncAPIid
- Push changes and push in git also (.graphqlconfig.yml is also in git repo)
- Checkout project on another dev computer
- Execute amplify init to select right role,...
- amplify status will show:
| Category | Resource name | Operation | Provider plugin |
| -------- | ----------------------- | --------- | ----------------- |
| Auth | xxx | No Change | awscloudformation |
| Hosting | xx | No Change | awscloudformation |
| Api | xxx | Delete | |
| Function | xx | No Change | awscloudformation |
Only way to get normal status again is to remove api and add it again.
Expected behavior
All category should be in "No Change" state and the new dev should get the amplify working fine after init.
Desktop (please complete the following information):
Cli version: 1.12.0 on mac (created the project and added the api)
Cli version: 3.9.0 on windows/linux (joined project after)
Additional context
One thing that was maybe different and can help debugging: One dev was on mac and the other one was on windows so the .graphqlconfig.yml changed the / to \ . I don't know if this could be the problem or help debugging it... (problem also occurs on a linux as second dev laptop).