Skip to content
Demonstration of using Terraform to deploy AppSync (with Schema and Resolvers)
Branch: master
Clone or download
Latest commit 35c0cf4 Feb 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cloudformation-templates Initial commit Feb 27, 2019
people-api Initial commit Feb 27, 2019
.gitignore Initial commit Feb 27, 2019
README.md Minor amendments Feb 27, 2019
main.tf Restrict access to DynamoDB based on schema Feb 27, 2019
outputs.tf Initial commit Feb 27, 2019
resolvers.tf Initial commit Feb 27, 2019
schema.tf Initial commit Feb 27, 2019
variables.tf Initial commit Feb 27, 2019

README.md

Deploying AWS AppSync using Terraform

This project accompanies a blog article I wrote demonstrating how to use CloudFormation with Terraform to deploy AppSync components that are not yet supported by Terraform's AWS Provider.

It will deploy an API with the ability to create and list people.

Deployment

The default variables will deploy an AppSync API called 'demo-people-api' with a authentication key that expires after 7 days.

$ terraform init
$ terraform apply

Querying the API

You can either query the API via AWS's AppSync page under 'Queries' or use GraphQL Playground. However if querying via GraphQL Playground then be sure to define the API key in the HTTP Header pane like so:

{
  "x-api-key": "KEY HERE"
}
You can’t perform that action at this time.