Terraform-provider-aws: bug: Error creating appsync api key / functions with ConcurrentModificationException ,Schema is currently being altered

Created on 16 Nov 2020  路  7Comments  路  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

terraform version : 0.13.5
AWS provider: 3.9.0

Affected Resource(s)

aws_appsync_resolver
aws_appsync_function
aws_appsync_api_key

Terraform Configuration Files

The following link has the required terraform files
https://github.com/terraform-aws-modules/terraform-aws-appsync/tree/master/examples/complete

Expected Behavior

app sync functions/api keys /resolvers are provisioned without any errors

Actual Behavior

Intermittent issues with following messages

Error: error creating Appsync API Key: ConcurrentModificationException: Schema is currently being altered, please wait until that is complete.

I have also observed cases when app sync functions are added

Error: Error creating AppSync Function: ConcurrentModificationException: Schema is currently being altered, please wait until that is complete.
Error: Error creating AppSync Function: ConcurrentModificationException: Schema is currently being altered, please wait until that is complete.
Error: Error creating AppSync Function: ConcurrentModificationException: Schema is currently being altered, please wait until that is complete.

The issue gets solved when we re trigger the job 30-60 secs later

Steps to Reproduce

  1. Clone the repo https://github.com/terraform-aws-modules/terraform-aws-appsync.git
  2. cd examples/complete
  3. terraform init
  4. terraform apply

As the issue is intermittent, job might need to be triggered several times before getting a reproduction of error.

References

https://github.com/aws/aws-cdk/pull/9737
https://docs.aws.amazon.com/appsync/latest/APIReference/API_UpdateGraphqlApi.htmlhttps://github.com/aws/aws-cdk/pull/9737

  • #0000
bug servicappsync

Most helpful comment

I am getting issues of appsync api key and appsync functions .
I did try using depends on with aws_appsync_graphql_api.resource_name not the aws_appsync_graphql_api.resource_name.id but I guess that should have same result.

All 7 comments

cc @antonbabenko

Happens to me also, any chance to be something that can be solved by adding depends_on?

I tried with depends_on ,it didnt work :(

Which resources have you tried? I'm suspecting that this happens when schema.graphql changes at the same time a new aws_appsync_function is created.

So if we add aws_appsync_graphql_api.resource_name.id in depends_on that might fix.

I am getting issues of appsync api key and appsync functions .
I did try using depends on with aws_appsync_graphql_api.resource_name not the aws_appsync_graphql_api.resource_name.id but I guess that should have same result.

Is the AWS provider maintained by AWS or Terraform ? In case of a bug , is it fixed by AWS team or terraform team ?

I am observing weird behaviour with appsync resource.
When I try to a terraform destory -auto-approve , I am getting the following error

Error: Error getting AppSync Function aaaaaaaaaaaaaaaaaaaa-bbbbbbbbbbbbbbbb: RequestError: send request failed
caused by: Get "https://appsync.us-east-1.amazonaws.com/v1/apis/aaaaaaaaaaaaaa/functions/bbbbbbbbbbbbbbbb": local error: tls: bad record MAC



Error: Error getting AppSync Function aaaaaaaaaaaaaaaaaaaa-ccccccccccccccccc: RequestError: send request failed
caused by: Get "https://appsync.us-east-1.amazonaws.com/v1/apis/aaaaaaaaaaaaaaaaaaaa/functions/ccccccccccccccccc": local error: tls: bad record MAC



Error: Error getting AppSync Function aaaaaaaaaaaaaaaaaaaa-dddddddddddddddd: RequestError: send request failed
caused by: Get "https://appsync.us-east-1.amazonaws.com/v1/apis/aaaaaaaaaaaaaaaaaaaa/functions/dddddddddddddddd": local error: tls: bad record MAC

However when I try to do a terraform destroy and then approve it manually, I either get the below error or sometimes its deleted

Error: Error deleting AppSync Function aaaaaaaaaaaaaaaaaaaa-bbbbbbbbbbbbbbbb: ConcurrentModificationException: Schema is currently being altered, please wait until that is complete.

Has anyone faced this issue with appsync ?

Was this page helpful?
0 / 5 - 0 ratings