Skip to content

gabrielh-silvestre/terraform-aws-apigateway-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7fd3cf1 · Jun 7, 2024

History

28 Commits
May 27, 2024
Mar 4, 2024
May 22, 2024
May 27, 2024
May 27, 2024
Jun 7, 2024
Jun 7, 2024
May 27, 2024
May 27, 2024
Jun 7, 2024
Jun 7, 2024

Repository files navigation

Terraform API Gateway

Terraform module to create N API Gateway resources with N integrations.

Usage

provider "aws" {
  region = "us-east-1"
}

data "aws_caller_identity" "current" {}
data "aws_region" "current" {}

module "apigateway" {
  source = "../"

  account_id       = data.aws_caller_identity.current.account_id
  region           = data.aws_region.current.name
  resources_prefix = "example" # Optional

  api_gtw = {
    name  = "my-gateway"
    stage = "dev"
    # path  = "/example" # Optional, default => "{proxy+}"

    # cognito_authorizer = { # Optional
    #   name          = "my-cognito-authorizer"
    #   provider_arns = ["arn:aws:cognito-idp:us-east-1:000000000000:userpool/us-east-1_FAKEID"]
    # }

    integration = {
      lambdas = [ # Optional
        {
          name = "my-lambda",
          # integration_methods = [ # Optional, default => [{ method = "ANY", with_autorizer = false }]
          #   {
          #     method         = "GET"
          #     with_autorizer = false
          #   },
          #   {
          #     method         = "POST"
          #     with_autorizer = true
          #   }
          # ]
        }
      ]

      # sns = [ # Optional
      #   {
      #     name = "my-topic"
      #     fifo = true # Optional, default => false
      #     integration_methods = [ # Optional, default => [{ method = "ANY", with_autorizer = false }]
      #       {
      #         method         = "GET"
      #         with_autorizer = false
      #       },
      #       {
      #         method         = "POST"
      #         with_autorizer = true
      #       }
      #     ]
      #   }
      # ]
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages