Skip to content

Drift Detection for AppSync Schema Changes #11460

Open
@AlexEshoo

Description

@AlexEshoo

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

Description

The documentation for the aws_appsync_graphql_api notes that there is no drift detection for schema changes:

schema - (Optional) The schema definition, in GraphQL schema language format. Terraform cannot perform drift detection of this configuration.

This causes some problems/confusion when changes are made in the AWS console but not on the local state.

It looks like the AWS API provides an endpoint for getting the current schema for a graphql API in appsync: https://docs.aws.amazon.com/appsync/latest/APIReference/API_GetIntrospectionSchema.html

Would this allow drift detection to be added to the terraform provider?

New or Affected Resource(s)

  • aws_appsync_graphql_api

Potential Terraform Configuration

resource "aws_appsync_graphql_api" "my_graphql_api" {
  authentication_type = "AMAZON_COGNITO_USER_POOLS"
  name = "myAPI"
  schema = data.local_file.graphql_schema.content
  user_pool_config {
    default_action = "ALLOW"
    user_pool_id = local.cognito_user_pool_id
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/appsyncIssues and PRs that pertain to the appsync service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions