Resource: aws_appsync_type

Provides an AppSync Type.

Example Usage

resource "aws_appsync_graphql_api" "example" {
  authentication_type = "API_KEY"
  name                = "example"
}

resource "aws_appsync_type" "example" {
  api_id     = aws_appsync_graphql_api.example.id
  format     = "SDL"
  definition = <<EOF
type Mutation

{
putPost(id: ID!,title: String! ): Post

}
EOF  
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Appsync Types using the id. For example:

import {
  to = aws_appsync_type.example
  id = "api-id:format:name"
}

Using terraform import, import Appsync Types using the id. For example:

% terraform import aws_appsync_type.example api-id:format:name