terraform-generate-apigw-modules

  1. Copy files gen_apigw.py and config.json to the API Gateway Terraform folder where to generate files
  2. Modify config.json and set appropriate values
  3. Create folder sources and add json files for each microservice.
  4. Execute gen_apigw.py: $ python gen_apigw.py

Final folder structure:

/apigw | - config.json | - gen_apigw.py | - main.tf --> This is the file where you can declare your aws_api_gateway_vpc_link and authorizers | - microservices.tf --> This file is generated by gen_apigw.py | - generated --> This folder is generated by gen_apigw.py | | - microservice-example | | - main.tf | - sources | | - microservice-example.json