Comments (4)
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.
@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.
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.
@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)
- Feature request: Define Access To VPC HOT 3
- Question: Do I need to zip Java lambda in form of JAR file? HOT 1
- Error: Unsupported block type on ..\..\modules\global\iam\main.tf line 4, in data "template_file" "lambda_dynamodb_policy": 4: vars { HOT 3
- Seems like general reference complex variable doesn't work HOT 4
- IAM module uses wrong naming conventions. HOT 1
- "lambda_code_s3_bucket" argument invalid in README.MD example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-api-gateway-lambda-dynamodb.