Git Product home page Git Product logo

Comments (4)

TheGreatAbyss avatar TheGreatAbyss commented on July 18, 2024

Here's my usage:

module "api-gateway-lambda-dynamodb" {
  source  = "crisboarna/api-gateway-lambda-dynamodb/aws"
  version = "1.13.0"
  
  # insert the 9 required variables here
  region = "us-east-1"
  project = var.project
  lambda_runtime = var.lambda_runtime
  lambda_memory_size = var.lambda_memory_size
  lambda_function_name = "My Project"
  lambda_handler = "my_project/lambda_runner.py"

   #DynamoDB
  dynamodb_table_properties = [
    {
      name = "Test Table 1",
      read_capacity = 2,
      write_capacity = 3,
      hash_key = "KEY"
      range_key = ""
      stream_enabled = "true"
      stream_view_type = "NEW_IMAGE"
    }
  ]

  dynamodb_table_attributes = [[
    {
      name = "KEY"
      type = "S"
    }],[
    {
      name = "PRIMARY_KEY"
      type = "N"
    }, {
      name = "SECONDARY_KEY"
      type = "S"
    }
   ]]

    #Lambda Environment variables
  environment_variables = {
    TEST_ENV = "Bernie"
  }

}

Thanks!

from terraform-aws-api-gateway-lambda-dynamodb.

archenroot avatar archenroot commented on July 18, 2024

@TheGreatAbyss - the issue is related to Terraform itself, I hit this as well. You need to create in every module/submodule variable region and best assign default value, in the main.tf just add in first line:

provider "aws" {
  region = "${var.region}"
}

That is one of temporary workarounds... hashicorp/terraform#21330

from terraform-aws-api-gateway-lambda-dynamodb.

sowmiya-ragu avatar sowmiya-ragu commented on July 18, 2024

Error:
Blocks of type "environment_variables" are not expected here. Did you mean to
define argument "environment_variables"? If so, use the equals sign to assign

Solution:
it a value.Below works like a charm - Terraform v0.12.21
environment_variables = {
hello = "heyy"
}
The "=" after enviornmental_varaibles matters.

from terraform-aws-api-gateway-lambda-dynamodb.

crisboarna avatar crisboarna commented on July 18, 2024

@TheGreatAbyss error is caused by him using Terraform 0.12+ whereas this module up to v1.14.0 is compatibile with up to Terraform 0.11.x. Please use recently published module version v1.15.1 for Terraform 0.12 usage.

from terraform-aws-api-gateway-lambda-dynamodb.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.