-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
v3.54.0_x5 plugin crashed on creating aws_cloudfront_origin_request_policy #20589
Comments
|
I've come up with a smaller example that produces the same result and a conclusion about what the issue might be. This resource defintion: resource "aws_cloudfront_origin_request_policy" "origin_request_policy" {
comment = "example-comment"
name = "example-name"
cookies_config {
cookie_behavior = "whitelist"
cookies {
items = []
}
}
headers_config {
header_behavior = "whitelist"
headers {
items = []
}
}
query_strings_config {
query_string_behavior = "all"
}
} Produces this plan
As you can see the headers and cookies blocks are empty brackets. They should be maps containing an empty list of items.
|
Same issue with |
Hey, just to centralize info on this thread, It's still an issue with version 3.58.0. |
same issue with: a whitelist with empty items crashes the plugin but... what I really wanted to do is: the following example works fine: resource "aws_cloudfront_origin_request_policy" "only-host-header" {
name = "${local.name_prefix}-only-host-policy"
cookies_config {
cookie_behavior = "none"
}
headers_config {
header_behavior = "whitelist"
headers {
items = ["Host"]
}
}
query_strings_config {
query_string_behavior = "none"
}
}
This is for a web page frontend deployed on EKS that already have an HTTPS domain and loadbalancer that needed Host Header to access properly to the webpage and then cloudfront on top for caching assets. |
This functionality has been released in v3.65.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.0.4 on linux_amd64
provider registry.terraform.io/hashicorp/aws v3.54.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/twiden/56ede08ad08bad55988e7537ac236fca
Panic Output
Expected Behavior
Two resources should be created:
1 aws_cloudfront_origin_request_policy
1 aws_cloudfront_cache_policy
Actual Behavior
Plugin crashes
Steps to Reproduce
terraform apply -auto-approve
Important Factoids
References
The text was updated successfully, but these errors were encountered: