Giter Club home page Giter Club logo

terraform-aws-api-gateway-lambda-dynamodb's People

Contributors

crisboarna avatar skalt avatar wguynes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terraform-aws-api-gateway-lambda-dynamodb's Issues

Seems like there is a bug

Hi,

I'm not an expert in TF so it could be user error, but I get the below errors.

➜  **:(master) ✗ terraform plan

Error: Missing required argument

The argument "region" is required, but was not set.


Error: Unsupported block type

  on .terraform/modules/api-gateway-lambda-dynamodb/crisboarna-terraform-aws-api-gateway-lambda-dynamodb-799f299/modules/global/iam/main.tf line 4, in data "template_file" "lambda_dynamodb_policy":
   4:   vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

Seems like general reference complex variable doesn't work

I go to dynamodb module only to validate (as I had lots of issues finally :-)), there is definitely one AWS related bug in terraform at moment:
hashicorp/terraform#21330

It requires to define in main.tf to have:

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

and define default via variables.tf

The real issue here is the reference to complex types:

local_secondary_index       = "${var.dynamodb_table_local_secondary_index[count.index]}"
global_secondary_index      = "${var.dynamodb_table_secondary_index[count.index]}"
ttl                         = "${var.dynamodb_table_ttl[count.index]}"

I get:

rror: Unsupported argument

  on main.tf line 19, in resource "aws_dynamodb_table" "table":
  19:   local_secondary_index  = "${var.dynamodb_table_local_secondary_index[count.index]}"

An argument named "local_secondary_index" is not expected here. Did you mean
to define a block of type "local_secondary_index"?


Error: Unsupported argument

  on main.tf line 20, in resource "aws_dynamodb_table" "table":
  20:   global_secondary_index = "${var.dynamodb_table_secondary_index[count.index]}"

An argument named "global_secondary_index" is not expected here. Did you mean
to define a block of type "global_secondary_index"?


Error: Unsupported argument

  on main.tf line 21, in resource "aws_dynamodb_table" "table":
  21:   ttl                    = "${var.dynamodb_table_ttl[count.index]}"

IAM module uses wrong naming conventions.

Error: "name" must match [\w+=,.@-]

  on ..\..\modules\global\iam\main.tf line 21, in resource "aws_iam_role" "lambda-role":
  21: resource "aws_iam_role" "lambda-role" {

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.