Giter Site home page Giter Site logo

terraform-aws-api-gateway-enable-cors's Issues

Error in versions > v0.12 Terraform

On using the terraform-aws-api-gateway-enable-cors module and running terraform plan
Error
│ on .terraform/modules/cors/headers.tf line 27, in locals:
│ 27: headers = map(
│ 28: "Access-Control-Allow-Headers", "'${join(",", var.allow_headers)}'",
│ 29: "Access-Control-Allow-Methods", "'${join(",", var.allow_methods)}'",
│ 30: "Access-Control-Allow-Origin", "'${var.allow_origin}'",
│ 31: "Access-Control-Max-Age", "'${var.allow_max_age}'",
│ 32: "Access-Control-Allow-Credentials", var.allow_credentials ? "'true'" : ""
│ 33: )
│ ├────────────────
│ │ var.allow_credentials will be known only after apply
│ │ var.allow_headers is a list of string, known only after apply
│ │ var.allow_max_age is a string, known only after apply
│ │ var.allow_methods is a list of string, known only after apply
│ │ var.allow_origin is a string, known only after apply

│ Call to function "map" failed: the "map" function was deprecated in Terraform v0.12 and is no longer available; use tomap({ ... }) syntax to write a
│ literal map.

just wanted to say thank you!

hey man,

you solved me a problem with a 10' internet search and 6 lines of code. It works like a charm and just wanted to say thank you for releasing this module. keep up with the good work!

❤️

Enabled CORS for nested resources

When I use the module to enable CORS on both a resource and its parent, I get the following error:

Error creating API Gateway Deployment: BadRequestException: No integration defined for method

Failing on Terraform 0.15

Terraform 0.15 removed the deprecated map() function, hence this module is not working. Error log below:

╷
│ Error: Error in function call
│
│   on .terraform/modules/cors_policy_item/headers.tf line 27, in locals:
│   27:   headers = map(
│   28:     "Access-Control-Allow-Headers", "'${join(",", var.allow_headers)}'",
│   29:     "Access-Control-Allow-Methods", "'${join(",", var.allow_methods)}'",
│   30:     "Access-Control-Allow-Origin", "'${var.allow_origin}'",
│   31:     "Access-Control-Max-Age", "'${var.allow_max_age}'",
│   32:     "Access-Control-Allow-Credentials", var.allow_credentials ? "'true'" : ""
│   33:   )
│     ├────────────────
│     │ var.allow_credentials will be known only after apply
│     │ var.allow_headers is a list of string, known only after apply
│     │ var.allow_max_age is a string, known only after apply
│     │ var.allow_methods is a list of string, known only after apply
│     │ var.allow_origin is a string, known only after apply
│
│ Call to function "map" failed: the "map" function was deprecated in Terraform v0.12 and is no longer available; use tomap({ ... }) syntax to write a literal map.

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.