-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Failure updating AppSync Schema still updates the terraform state for it #20055
Comments
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
I got this behavior when I had a syntax error in my schema. AWS errors out, the error message returned by terraform doesn't indicate the problem, but then the tf state file incorrectly shows the schema was updated. My workaround was to remove the schema from the terraform resource, and that was accepted. At that point AWS and the tf state were in sync, both showing an api with no schema. Then I validated my schema syntax in the AWS AppSync console schema editor to see what my error was, but I didn't save the schema there. Then I updated the schema in my terraform resource with the correct syntax, and it was all good. |
This still happens when using:
I hope this gets fixed soon! |
Community Note
Terraform CLI and Terraform AWS Provider Version
(Terraform is not the latest one, but as I can understand the issue is most likely is in the provider, which is the latest one).
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/ddanila/7ea7f755cb57cf96abca28b1dcdd90ce
Expected Behavior
Schema is updated successfully. Terraform State is in sync with the remote state in AWS.
Actual Behavior
Schema failed to update successfully.
Terraform State contains the updated schema.
AWS still has the previous version of the schema.
Steps to Reproduce
Note: unfortunately, it's not that easy to reproduce the issue. For some unknown reason AWS returned failure on the schema update (was adding "
index: Int
" field).terraform plan -out=plan
terraform apply "plan"
Note that trying to apply the changes again lead to
No changes. Infrastructure is up-to-date.
message.Same for the refresh attempt for the obvious reason:
(this statement is not true, infra does not match the state, but this is expected due to #11460)
References
The text was updated successfully, but these errors were encountered: