terraform-examples icon indicating copy to clipboard operation
terraform-examples copied to clipboard

Update type constraint references

Open dededecline opened this issue 3 years ago • 0 comments

Running the AWS static site example leads to these errors and warnings when running terraform init:

│ 
│   on .terraform/modules/my_site.aws_reverse_proxy/aws_reverse_proxy/certificate.tf line 4, in resource "aws_acm_certificate" "this":
│    4:   provider          = "aws.us_east_1"                                                              # because ACM is only available in the "us-east-1" region
│ 
│ In this context, references are expected literally rather than in quotes. Terraform 0.11 and earlier required quotes, but quoted references are now deprecated and will be removed in a future version of Terraform. Remove the quotes surrounding this
│ reference to silence this warning.
│ 
│ (and 4 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on .terraform/modules/my_site.aws_reverse_proxy/aws_reverse_proxy/variables.tf line 41, in variable "add_response_headers":
│   41:   type        = "map"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes, but that form is now deprecated and will be removed in a future version of Terraform. Remove the quotes around "map" and write map(string) instead to explicitly indicate that
│ the map elements are strings.
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on .terraform/modules/my_site.aws_reverse_proxy/aws_reverse_proxy/variables.tf line 108, in variable "tags":
│  108:   type        = "map"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes, but that form is now deprecated and will be removed in a future version of Terraform. Remove the quotes around "map" and write map(string) instead to explicitly indicate that
│ the map elements are strings.
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on .terraform/modules/my_site/aws_static_site/variables.tf line 42, in variable "add_response_headers":
│   42:   type        = "map"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes, but that form is now deprecated and will be removed in a future version of Terraform. Remove the quotes around "map" and write map(string) instead to explicitly indicate that
│ the map elements are strings.
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on .terraform/modules/my_site/aws_static_site/variables.tf line 76, in variable "tags":
│   76:   type        = "map"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes, but that form is now deprecated and will be removed in a future version of Terraform. Remove the quotes around "map" and write map(string) instead to explicitly indicate that
│ the map elements are strings.

Version info:

╰─ tf -v
Terraform v0.15.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v3.40.0

dededecline avatar May 15 '21 22:05 dededecline