Skip to content

Commit

Permalink
feat!: Added appsync visibility option, bump AWS provider version to …
Browse files Browse the repository at this point in the history
…5.x (#50)

Co-authored-by: Anton Babenko <[email protected]>
  • Loading branch information
itaywol and antonbabenko authored Jun 5, 2023
1 parent 5c73980 commit 6fd4bb4
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.0
rev: v1.80.0
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module "appsync" {
schema = file("schema.graphql")
visibility = "GLOBAL"
api_keys = {
default = null # such key will expire in 7 days
}
Expand Down Expand Up @@ -112,14 +114,14 @@ $ terraform apply
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.49 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.1 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.49 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.1 |

## Modules

Expand Down Expand Up @@ -188,6 +190,7 @@ No modules.
| <a name="input_schema"></a> [schema](#input\_schema) | The schema definition, in GraphQL schema language format. Terraform cannot perform drift detection of this configuration. | `string` | `""` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Map of tags to add to all GraphQL resources created by this module | `map(string)` | `{}` | no |
| <a name="input_user_pool_config"></a> [user\_pool\_config](#input\_user\_pool\_config) | The Amazon Cognito User Pool configuration. | `map(string)` | `{}` | no |
| <a name="input_visibility"></a> [visibility](#input\_visibility) | The API visibility. Valid values: GLOBAL, PRIVATE. | `string` | `null` | no |
| <a name="input_xray_enabled"></a> [xray\_enabled](#input\_xray\_enabled) | Whether tracing with X-ray is enabled. | `bool` | `false` | no |

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.49 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.1 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.49 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.1 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 2 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ module "appsync" {

schema = file("schema.graphql")

visibility = "GLOBAL"

domain_name_association_enabled = true
caching_enabled = true

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.49"
version = ">= 5.1"
}
random = {
source = "hashicorp/random"
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resource "aws_appsync_graphql_api" "this" {
authentication_type = var.authentication_type
schema = var.schema
xray_enabled = var.xray_enabled
visibility = var.visibility

dynamic "log_config" {
for_each = var.logging_enabled ? [true] : []
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ variable "domain_name_association_enabled" {
type = bool
default = false
}

variable "caching_enabled" {
description = "Whether caching with Elasticache is enabled."
type = bool
Expand All @@ -39,6 +40,12 @@ variable "schema" {
default = ""
}

variable "visibility" {
description = "The API visibility. Valid values: GLOBAL, PRIVATE."
type = string
default = null
}

variable "authentication_type" {
description = "The authentication type to use by GraphQL API"
type = string
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.49"
version = ">= 5.1"
}
random = {
source = "hashicorp/random"
Expand Down

0 comments on commit 6fd4bb4

Please sign in to comment.