[Enhancement]: aws_cloudfront_distribution custom_error_response should require both ResponsePagePath and ResponseCode together or none of them #32431
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/cloudfront
Issues and PRs that pertain to the cloudfront service.
Terraform Core Version
1.5.2
AWS Provider Version
5.6.2
Affected Resource(s)
aws_cloudfront_distribution.custom_error_response
Expected Behavior
When, in a custom_error_response a response_page_path is set, but no response_code,
terraform validate
should raise a warning.Actual Behavior
No warning is issued by terraform validate, and the operation fails when applying.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Main.tf:
Variables.tf:
Steps to Reproduce
terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: