cloudposse / terraform-aws-cloudfront-cdn

Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
https://cloudposse.com/accelerate
Apache License 2.0
99 stars 121 forks source link

Fix incorrect type declaration #64

Closed paulerickson closed 3 years ago

paulerickson commented 3 years ago

what

why

example errors

With explicit tomap

Error: Invalid function argument
  on main.tf line 131, in module "router":
 131:       custom_origin_config = tomap({
 132:         http_port                = 80
 133:         https_port               = 443
 134:         origin_protocol_policy   = "https-only"
 135:         origin_ssl_protocols     = ["my", "favorite", "protocols"]
 136:         origin_keepalive_timeout = 12345
 137:         origin_read_timeout      = 12345
 138:       })
Invalid value for "v" parameter: cannot convert object to map of any single
type.

With {} syntax

he given value is not suitable for child module variable "custom_origins"
defined at .terraform/modules/router/variables.tf:322,1-26: element 0:
attribute "custom_origin_config": all map elements must have the same type.
…
  81:       custom_origin_config = {
  82:         http_port                = 80
  83:         https_port               = 443
  84:         origin_protocol_policy   = "https-only"
  85:         origin_ssl_protocols     = ["my", "favorite", "protocols"]
  86:         origin_keepalive_timeout = 12345
  87:         origin_read_timeout      = 12345
  88:       }
…
aknysh commented 3 years ago

/test all

aknysh commented 3 years ago

/rebuild-readme