Open masterqwerty opened 2 years ago
Update: Exact same thing happens with provider version 3.66.0
@masterqwerty I fixed it by adding at least one arg in each *_config
cookies_config { cookie_behavior = "none" }
headers_config { header_behavior = "none" }
query_strings_config { query_string_behavior = "whitelist"
query_strings { items = ["v", "versions"] } }
Just ran into this on 5.41.0.
Missing cookie_behavior
and query_string_behavior
arguments correctly throw errors
β·
β Error: Missing required argument
β
β on cloudfront.tf line 16, in resource "aws_cloudfront_cache_policy" "pod":
β 16: cookies_config {
β
β The argument "cookie_behavior" is required, but no definition was found.
β΅
β·
β Error: Missing required argument
β
β on cloudfront.tf line 22, in resource "aws_cloudfront_cache_policy" "pod":
β 22: query_strings_config {
β
β The argument "query_string_behavior" is required, but no definition was found.
β΅
but missing header_behavior
still panics.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.0.11 on linux_amd64 provider registry.terraform.io/hashicorp/aws v3.65.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/masterqwerty/d8c94b5d70f8c387c1534b8b30c49e72
Panic Output
https://gist.github.com/masterqwerty/e1b55abeffa28b8fe017b356189352b3
Expected Behavior
When I apply, Terraform should give me an error message saying that my terraform is invalid because the
headers_config
block is missing required values.Actual Behavior
The provider plugin crashes and produces a panic. (See gist link above.)
Steps to Reproduce
terraform apply
References
20589