Resource: aws_appsync_api_key

Provides an AppSync API Key.

Example Usage

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

resource "aws_appsync_api_key" "example" {
  api_id  = aws_appsync_graphql_api.example.id
  expires = "2018-05-03T04:00:00Z"
}

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 aws_appsync_api_key using the AppSync API ID and key separated by :. For example:

import {
  to = aws_appsync_api_key.example
  id = "xxxxx:yyyyy"
}

Using terraform import, import aws_appsync_api_key using the AppSync API ID and key separated by :. For example:

% terraform import aws_appsync_api_key.example xxxxx:yyyyy