Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on Terraform 0.15 #12

Closed
abbaspour opened this issue Apr 17, 2021 · 4 comments · Fixed by #14
Closed

Failing on Terraform 0.15 #12

abbaspour opened this issue Apr 17, 2021 · 4 comments · Fixed by #14

Comments

@abbaspour
Copy link

abbaspour commented Apr 17, 2021

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.
@squidfunk
Copy link
Owner

Fixed by #13.

@abbaspour
Copy link
Author

build is failing. 0.3.3 not published :(

@squidfunk
Copy link
Owner

I see, some things seem to have changed. Might you be able to help fix the build in a PR? I can re-issue 3.3 then.

@squidfunk
Copy link
Owner

I just reissued 0.3.3 after the fixes in #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants