From ee82a6e337953864dedc5c5f9baf76e22f136e12 Mon Sep 17 00:00:00 2001 From: stack72 Date: Wed, 28 Jun 2017 12:11:09 +0300 Subject: [PATCH] r/cloudfront_distribution: Remove validation from custom_origin params Fixes: #934 removes the hard limit as people can request a custom increase from AWS. --- aws/resource_aws_cloudfront_distribution.go | 15 ++++++--------- .../docs/r/cloudfront_distribution.html.markdown | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_cloudfront_distribution.go b/aws/resource_aws_cloudfront_distribution.go index e5c91cde98e..c1bf53ec44c 100644 --- a/aws/resource_aws_cloudfront_distribution.go +++ b/aws/resource_aws_cloudfront_distribution.go @@ -11,7 +11,6 @@ import ( "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudFrontDistribution() *schema.Resource { @@ -358,16 +357,14 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Required: true, }, "origin_keepalive_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - ValidateFunc: validation.IntBetween(1, 60), + Type: schema.TypeInt, + Optional: true, + Default: 5, }, "origin_read_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - ValidateFunc: validation.IntBetween(4, 60), + Type: schema.TypeInt, + Optional: true, + Default: 30, }, "origin_protocol_policy": { Type: schema.TypeString, diff --git a/website/docs/r/cloudfront_distribution.html.markdown b/website/docs/r/cloudfront_distribution.html.markdown index e28b781def4..c1b9a992ca5 100644 --- a/website/docs/r/cloudfront_distribution.html.markdown +++ b/website/docs/r/cloudfront_distribution.html.markdown @@ -316,9 +316,9 @@ argument is not required. CloudFront to use when communicating with your origin over HTTPS. A list of one or more of `SSLv3`, `TLSv1`, `TLSv1.1`, and `TLSv1.2`. - * `origin_keepalive_timeout` - (Optional) The Custom KeepAlive timeout, in seconds. Value must be between `1` and `60`. + * `origin_keepalive_timeout` - (Optional) The Custom KeepAlive timeout, in seconds. By default, AWS enforces a limit of `60`. But you can request an [increase](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-request-timeout). - * `origin_read_timeout` - (Optional) The Custom Read timeout, in seconds. Value must be between `4` and `60`. + * `origin_read_timeout` - (Optional) The Custom Read timeout, in seconds. By default, AWS enforces a limit of `60`. But you can request an [increase](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-request-timeout). ##### S3 Origin Config Arguments